Hi,
gcc emits an error, when compiling this code-snippet:
--- snip ---
extern int x;
void
foo (void)
{
x = sizeof ((long));
}
--- snip ---
# gcc -Wall -o tmp.o -c tmp.c
tmp.c: In function ‘foo’:
tmp.c:6:21: error: expected expression before ‘)’ token
# gcc --version
gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
# sparc-rtems4.11-gcc -Wall -o tmp.o -c tmp.c
tmp.c: In function 'foo':
tmp.c:6:21: error: expected expression before ')' token
# sparc-rtems4.11-gcc --version
sparc-rtems4.11-gcc (GCC) 4.5.2 20101216 (RTEMS
gcc-4.5.2-3.fc14/newlib-1.19.0-1.fc14)
Any explanations? What is wrong?
FWIW: I encountered this error when checking libstdc++'s config.log,
after having noticed its configure script was producing bogus results.
The code-snippet above is a stripped down fragment of one of these
failing configure-checks.
Ralf