gcc 4.6 embeded cpp 'feature'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gurus,

I got this with my xbuild arm32 gcc

CU82$ cat c.c
#define __extension__
#include <unistd.h>
int foo(){char b[4]; b[0]=0; read(0,b,4); return(b[0]);}


CU82$ arm-linux-gnueabi-gcc -E c.c |
           arm-linux-gnueabi-gcc -c -o c.o -O -xc -

CU82$

Meaning it all compile fine with no warnings or errors.

CU82$ arm-linux-gnueabi-gcc -c c.c -O
c.c: In function 'foo':
c.c:3:34: warning: ignoring return value of 'read', declared with attribute warn
_unused_result [-Wunused-result]

Meaning the embeded cpp missed the expansion of __extension__

Is this expected?

We heavily depend on cpp behave the same explicit or embeded


Cheers,
Phi




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux