This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GCC Hexadecimal Floating point constant handling
- From: Ameya Malondkar <ameya dot malondkar at tcs dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 3 Nov 2009 22:09:41 -0800 (PST)
- Subject: GCC Hexadecimal Floating point constant handling
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.