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: To const or not to const...


On Thu, 2003-02-20 17:27:30 +0000, Nathan Sidwell <nathan at codesourcery dot com>
wrote in message <3E551002 dot 9010902 at codesourcery dot com>:
> Jan-Benedict Glaw wrote:
> 
> >
> >"Hello"[2] (which is 'l') is truly constant, in my eyes. This could fall
> >under C99 6.6. OTOH, as also mentioned on #gcc, this may be some
> >undefined thing wrt. C99 and it may be in conflict with 6.6.9.
> >However, I'd love to see this implemented:-)
> it fails to be an arithmetic constant expression as it involves something
> not on the list of allowed things that [6/6]/9 lists.

I do not think that 6.6/9 is appropriate: What comes off this notation
is some integer type, it's for sure not an "address constant".
Address/pointer calculation is required to calculate that value,
though...

> But, we're allowed to accept other things in an implementation defined
> manner (para 10).

That sounds better:-) May I open a whishlist bug to get this
implemented?

However - I think leaving this to 6.6/10 isn't all that good. I'm
actually thinking about handing this one over to the C99 folks...

Or could this be a case for 6.6/6 - character constants?

MfG, JBG

-- 
   Jan-Benedict Glaw       jbglaw at lug-owl dot de    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur
    fuer einen Freien Staat voll Freier Bürger" | im Internet!
   Shell Script APT-Proxy: http://lug-owl.de/~jbglaw/software/ap2/

Attachment: pgp00000.pgp
Description: PGP signature


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