Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-10 Thread Terry Lambert
Garrett Wollman wrote: > `#if __GNUC__' wouldn't help matters; every preprocessor has to read > and interpret every preprocessor directive (so that `#else' and > `#endif' can be recognized). I thought that the other discussion had concluded that: #if 0 ... #else Or:

Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-10 Thread Terry Lambert
Craig Rodrigues wrote: > In , I see: > > #if __GNUC__ > #warning "No user-serviceable parts inside." > #endif > > Does the use of #warning need to be protected by > #if __GNUC__ in FreeBSD header files? Yes. It is a preprocessor directive specific the GCC preprocessor. This was discussed in gre

Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Maxime Henrion
Garance A Drosihn wrote: > At 2:33 PM -0500 3/8/03, Garance A Drosihn wrote: > > > >By adding that #warning, you are going to have a compile-time error > >on some compilers, whether or not you want it. Hiding it inside of > >an #if/#endif will help for some compilers, but not on all of them. > >

Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Garance A Drosihn
At 2:33 PM -0500 3/8/03, Garance A Drosihn wrote: By adding that #warning, you are going to have a compile-time error on some compilers, whether or not you want it. Hiding it inside of an #if/#endif will help for some compilers, but not on all of them. Er, I should note that I do like the idea of

Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Garance A Drosihn
At 10:48 AM -0800 3/8/03, Marcel Moolenaar wrote: On Sat, Mar 08, 2003 at 12:28:13PM -0500, Garrett Wollman wrote: > `#if __GNUC__' wouldn't help matters; every preprocessor has to > read and interpret every preprocessor directive (so that `#else' > and `#endif' can be recognized). I don't thin

Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Marcel Moolenaar
On Sat, Mar 08, 2003 at 12:28:13PM -0500, Garrett Wollman wrote: > > `#if __GNUC__' wouldn't help matters; every preprocessor has to read > and interpret every preprocessor directive (so that `#else' and > `#endif' can be recognized). I don't think preprocessors should interpret directives when t

Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Marcel Moolenaar
On Sat, Mar 08, 2003 at 11:19:43AM -0500, Craig Rodrigues wrote: > Hi, > > In , I see: > > #if __GNUC__ > #warning "No user-serviceable parts inside." > #endif > > > Does the use of #warning need to be protected by > #if __GNUC__ in FreeBSD header files? I am working > on something similar for

Re: #warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Dan Nelson
In the last episode (Mar 08), Garrett Wollman said: > On Sat, 8 Mar 2003 11:19:43 -0500, Craig Rodrigues <[EMAIL PROTECTED]> said: > > Does the use of #warning need to be protected by > > #if __GNUC__ in FreeBSD header files? > > No, it needs to be replaced by the standard `#error' directive > ins

#warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Garrett Wollman
< said: > Does the use of #warning need to be protected by > #if __GNUC__ in FreeBSD header files? No, it needs to be replaced by the standard `#error' directive instead. I asked portmgr to do a run on the portsd cluster with this change to look for ports that mistakenly include this file, but I

#warning must be protected by #if __GNUC__ in headers?

2003-03-08 Thread Craig Rodrigues
Hi, In , I see: #if __GNUC__ #warning "No user-serviceable parts inside." #endif Does the use of #warning need to be protected by #if __GNUC__ in FreeBSD header files? I am working on something similar for . Some other header files check for __GNUC__ before using #warning, such as , but does