[PATCH][RFC] Add #pragma message ... to gcc/g++

Mark Mitchell mark@codesourcery.com
Wed Jul 23 04:16:00 GMT 2008


Simon Baldwin wrote:

> icc writes such messages to stdout, not to stderr.  I don't see a 
> particular problem with writing to stderr if it's deemed more 
> desirable.  But since stderr is intended for error messages and warning, 
> and '#pragma message ...' is by design neither warning nor error, using 
> stderr rather than stdout seems a bit misleading.  And writing to stderr 
> waters down compatibility with icc.

However, writing it to stdout means that the presence of #pragma message 
will break things like:

   gcc -E foo.c > foo.i

which seems bad.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list