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]
Other format: [Raw text]

Re: C constant expressions proposals


"Joseph S. Myers" <jsm@polyomino.org.uk> writes:

> On Sat, 14 Aug 2004, Zack Weinberg wrote:
> 
> > Since you specifically ask about 20010327-1.c, I think it looks
> > awfully like the sort of code that people write down in the guts of an
> > operating system, and I think we have broken those people's code a lot
> > and maybe we should think about cutting them some slack.
> 
> It's only the version with a cast to an integer of different width that's 
> a problem (and specifically when longs are a different width from 
> pointers).  The case of a cast to an integer of the same width is 
> 20011114-1.c, which I propose to keep valid.

The point of 20010327-1.c is that it's the only way to get certain
functionality out of the linker.  It's necessary for strange cases
involving, for instance, an interface between 32-bit and 64-bit code.
It's perfectly OK if this is only accepted in an initializer, but it
does need to be accepted.


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