On Tue, 24 Sep 2013 11:18:30 +0800, David Crayford wrote:
>
>The C++ committee wanted to deprecate trigraphs in the last standard
> http://tinyurl.com/n3nas3u. EBCDIC was the only tangible reason
>for keeping them alive. I've lost count of the amount of times I've had
>a C/C++ analysis tool choke because of trigraphs - doxygen, valgrind etc.
>
Was this because the compiler was trigraph-savvy and the analysis
tool naive, or vice-versa? Consistent use of the same preprocessor
ought to remove the problem.
Hmmm... so the intent of the design seems to be that in a code
page in which (e.g.) '#' does not exist the programmer can code
??=include <stdio.h>
and the preprocessor will understand it as:
#include <stdio.h>
Use in quoted strings has more problems. What if the programmer
codes:
printf( "%d %d '%s'\n", strlen( "??=" ), * "??=", "??=" );
...? Well, if '#' is defined in the code page in use but the programmer's
motivation is that it is not readily available on the keyboard, I'd expect:
1 nnn '#'
... but if the code page has no '#' and is fully populated with 256 other
characters, what should happen? Syntax error in preprocessing?
Other (specify)?
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN