This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GNU Coding Standards -- updated
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Subject: Re: GNU Coding Standards -- updated
- From: Hartmut Schirmer <hartmut dot schirmer at arcormail dot de>
- Date: Thu, 16 Aug 2001 20:09:17 +0200
- Cc: carlo at alinoe dot com (Carlo Wood), pfeifer at dbai dot tuwien dot ac dot at (Gerald Pfeifer), gcc at gcc dot gnu dot org, mark at codesourcery dot com (Mark Mitchell)
- References: <20010816152715.A10450@hg.cs.mu.oz.au>
- Reply-To: hartmut dot schirmer at arcormail dot de
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