GCC Hexadecimal Floating point constant handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



GCC accepts constructs such as :  float p = 0x.p5;


As per C99 Standards the grammar for hexadecimal floating points is as
follows : 
hexadecimal-floating-constant:
                                        hexadecimal-prefix
hexadecimal-fractional-constant
                                                            
binary-exponent-part floating-suffix(opt)
                                        hexadecimal-prefix
hexadecimal-digit-sequence
                                                            
binary-exponent-part floating-suffix(opt)

hexadecimal-prefix: one of
                           0x 0X

hexadecimal-fractional-constant:
                                        hexadecimal-digit-sequence(opt) .
hexadecimal-digit-sequence
                                        hexadecimal-digit-sequence .

binary-exponent-part:
                                        p signopt digit-sequence
                                        P signopt digit-sequence

hexadecimal-digit-sequence:
                                        hexadecimal-digit
                                        hexadecimal-digit-sequence
hexadecimal-digit

floating-suffix: one of
                     f l F L


As per the grammar to my understanding, the above construct is invalid. 
Just wanted to know whether the support for the above construct is a GCC
Extension or my understanding of the grammar is incorrect?
-- 
View this message in context: http://old.nabble.com/GCC-Hexadecimal-Floating-point-constant-handling-tp26191496p26191496.html
Sent from the gcc - Help mailing list archive at Nabble.com.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux