[cfe-dev] Unknown pragma warning in newlib

Joel Sherrill joel.sherrill at OARcorp.com
Thu Jul 7 08:46:04 PDT 2011


Hi,

Pushing more on *-*-rtems*, I came across
a pragma in newlib that apparently gcc
knows that clang does not.

$ cat j.c
char * mktemp (char *) __attribute__ ((__warning__ ("the use of `mktemp' 
is dangerous; use `mkstemp' instead")));
$ gcc -c -Wall j.c
$ clang -c j.c
j.c:1:40: warning: unknown attribute '__warning__' ignored [-Wattributes]
char * mktemp (char *) __attribute__ ((__warning__ ("the use of ...
                                        ^
1 warning generated.

Thanks.

-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985





More information about the cfe-dev mailing list