This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GNU Coding Standards -- updated


On Thu, 16 Aug 2001, Fergus Henderson wrote:
>	#if MMAP_THRESHOLD
[...]
>	#endif

one should never use #if this way. You canīt catch simple
errors like

#if MAP_THRESHOLD
#if MNAP_THRESHOLD

etc. Most compilers silently assume 0 as value
for the wrong identifier.

Just make the macro function like

#if MMAP_THRESHOLD()

and every compiler will give you an error or
at least a warning. The error/warning message isnīt
always ver helpfull but much better than silence.

Hartmut


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]