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


On Sat, 14 Aug 2004, Gabriel Dos Reis wrote:

> | I've now updated the rules for GNU C to document handling of complex 
> | numbers better and to state that implicit conversions are treated as casts 
> | to avoid that initializer being treated as valid because (int)&x, before 
> | conversion to _Complex int, is being treated as an address constant.
> | 
> | http://www.srcf.ucam.org/~jsm28/gcc/#const
> 
> Humm, I don't seem to see a corresponding change in
> 
>    http://www.srcf.ucam.org/~jsm28/gcc/const-exprs-gnu.txt
> 
> near the end.

That's because the changes are earlier in the file, where it says

Implicit conversions of operands to a common type, in initialization,
and otherwise, are treated as if they were explicit casts.  (This is
irrelevant to the standard models, but avoids problems here with
implicit conversions of integer address constants to wider types.)

(plus some bits adding restrictions such "real integer type").

The part at the end remains just dealing with the grammar productions 
using __real__ and __imag__.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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