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: Here's a pretty puzzle...


or fixincludes?

> -----Original Message-----
> From:	Fergus Henderson [SMTP:fjh@cs.mu.oz.au]
> Sent:	Tuesday, 17 April 2001 17:48
> To:	Zack Weinberg
> Cc:	gcc@gcc.gnu.org
> Subject:	Re: Here's a pretty puzzle...
> 
> On 17-Apr-2001, Zack Weinberg <zackw@stanford.edu> wrote:
> > Suppose you have an untyped enumeration constant.  Let's call it
> > N_OPT, to pick a value not entirely at random.  It's supposed to be
> > defined in a system header, but it might not be.  You want to provide
> > a default value for this constant only if the system header doesn't.
> > You can't use #ifdef, because it isn't a macro, it's only an
> > enumeration constant.
> > 
> > Has anyone any idea how to do that in plain C?
> >
> > This isn't a hypothetical, this is something at least dbxout.c and
> > sdbout.c need to do.
> 
> I don't think it's possible in plain C.  But why not use an autoconf test?
> 
> -- 
> Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the
> pursuit
>                                     |  of excellence is a lethal habit"
> WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


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