S
SaGS
Hi all,
Either I'm missing something big here, or there's a problem with the C
compiler in .NET 2003; and with the C compiler in Visual Studio 6 SP5 too
....
Consider the following 2 lines:
#define TEST_$$$ 0x05
static test_$$$[] = { TEST_$$$ };
The compiler works as if '$' were a valid character to be used for an
identifier, and signals no warnings/errors.
From what I know, during preprocessing it should define the symbol "TEST_"
as the token sequence "$" "$" "$" "0x05" (I put the quotes to mark how I
consider the source text should be broken into tokens), so the second line
becomes
"static" "test_" "$" "$" "$" "[" "]" "=" "{" "$" "$" "$" "0x05" "$" "$"
"$" "}" ";"
(with lots of syntax errors).
What I'm missing here? Or is there a known bug with the C compiler?
Either I'm missing something big here, or there's a problem with the C
compiler in .NET 2003; and with the C compiler in Visual Studio 6 SP5 too
....
Consider the following 2 lines:
#define TEST_$$$ 0x05
static test_$$$[] = { TEST_$$$ };
The compiler works as if '$' were a valid character to be used for an
identifier, and signals no warnings/errors.
From what I know, during preprocessing it should define the symbol "TEST_"
as the token sequence "$" "$" "$" "0x05" (I put the quotes to mark how I
consider the source text should be broken into tokens), so the second line
becomes
"static" "test_" "$" "$" "$" "[" "]" "=" "{" "$" "$" "$" "0x05" "$" "$"
"$" "}" ";"
(with lots of syntax errors).
What I'm missing here? Or is there a known bug with the C compiler?