GCC Hexadecimal Floating point constant handling
Ameya Malondkar
ameya.malondkar@tcs.com
Wed Nov 4 06:09:00 GMT 2009
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.
More information about the Gcc-help
mailing list