From the name of the file ("iso546.h") it appear the the intent is to provide an alternative for those ISO 646 7-bit ASCII characters sets that do not contain some of the punctuation marks used in C and C++. Not necessary, of course, because the C standard has its own way of dealing with those characters:
(I'm a bit surprised that __cplusplus is NOT defined during an Arduino compile.)
[quote author=Nick Gammon link=topic=60082.msg433173#msg433173 date=1304334410]
Well this is creepy:[/quote]
Well, creepy is as creepy does, but that's not really creepy. That file and the definitions therein are part of the C standard language specification ISO/IEC 9899:1999. (Page 201, paragraph 7.9.)
As you noted, the stuff in that file is defined that way for C programs that include that header. What about C++? Well, that is covered in the C++ standard language specification ISO/IEC 14882:2003. That set of identifiers is listed as reserved. (Table 4 - alternative representations on Page 14.) They are part of the C++ language and do not depend on macro definitions.
johnwasser:
...
(I'm a bit surprised that __cplusplus is NOT defined during an Arduino compile.)
In fact when avr-gcc is invoked as a C++ compiler (it's automatic when the file is named something.cpp), __cplusplus is defined. Arduino sketches end up in a file named something.cpp and the compile line is avr-g++ withabunchofstuff something.cpp andabunchofotherstuff
void setup()
{
Serial.begin(9600);
#ifdef __cplusplus
Serial.print("__cplusplus is defined.");
#else
Serial.print("__cplusplus is not defined.");
#endif
}
void loop(){}
Can you give the exact reference? I am not familiar with "ANSI (C++ 99)."
However...
Comparing your post with Table 3 in section 2.11 on page 14 of Programming Languages --- C++, ISO/IEC 14882:2003(E), I perceive that your list is missing the following 33 reserved keywords:
auto
break
case
char
const
continue
default
do
double
else
enum
export
extern
float
for
goto
int
long
register
return
short
signed
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
wchar_t
while
No i can't as I put it together years ago, but you're correct in that they are missing from my list as posted.
I seem to have a problem, somewhere, when I copy from my system to the forums editor, where content disappears or is wrongly formatted. I wish I new exactly where it was happening. It most often looks correct in the "preview" but occasionally is whacked durning the "post" process.