[plug] #define ANSI_COMPILE

Russell Steicke r.steicke at bom.gov.au
Wed Feb 11 19:55:03 WST 2004


On Wed, Feb 11, 2004 at 11:39:10AM +0000, Alex Bobby wrote:
> 
> Hello,
> 
> I went through man page about GCC for '-ansi' compilalation and am not clear about the usage.

Umm, it looks pretty clear to me (man page for gcc 3.3.3 on debian sid).
What are you unsure about?

> How can the code be customized if the macro 
> 
> #define ANSI_COMPILE 
> 
> is used at the beginning of the implementation file.

This is not directly related to the -ansi switch, but you could make
your code notice that switch.  According to the man page, -ansi defines
__STRICT_ANSI__, so you could do something like this:

  #ifdef __STRICT_ANSI__
  # define ANSI_COMPILE
  #endif

Then your other code which presumably is conditional on ANSI_COMPILE
might do the right thing.   Maybe.  But your question is a bit unclear,
so I've probably missed the point.




-- 
Russell Steicke

-- Fortune says:

 [   ]  DOGBERT
 [ 2 ]  RICHARD STALLMAN
 [ 3 ]  BUFFY SUMMERS
 [ 1 ]  MANOJ SRIVASTAVA
 [ 4 ]  NONE of the above

        -- Debian Project Leader 1999 ballot



More information about the plug mailing list