diff options
author | pfg <pfg@FreeBSD.org> | 2013-05-12 15:29:35 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-05-12 15:29:35 +0000 |
commit | b0d72f0d7ad6703e4a6d78b99590ac1fbcb716fb (patch) | |
tree | 09efed35d1d90aebbe44c54da46d272ea7bdb62d /contrib/gcc | |
parent | 168bd583e81022553017d75b42291248fd1b0f3e (diff) | |
download | FreeBSD-src-b0d72f0d7ad6703e4a6d78b99590ac1fbcb716fb.zip FreeBSD-src-b0d72f0d7ad6703e4a6d78b99590ac1fbcb716fb.tar.gz |
Add support for "d" floating-point suffix, as defined by draft N1312
of TR 24732. Emit pedantic warning if the feature is being used.
Should solve GCC bug 39027.
Obtained from: OpenBSD
MFC after: 2 weeks
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/c-lex.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/gcc/c-lex.c b/contrib/gcc/c-lex.c index 108bc5c..9ec348c 100644 --- a/contrib/gcc/c-lex.c +++ b/contrib/gcc/c-lex.c @@ -640,6 +640,13 @@ interpret_float (const cpp_token *token, unsigned int flags) char *copy; size_t copylen; + /* Default (no suffix) is double. */ + if (flags & CPP_N_DEFAULT) + { + flags ^= CPP_N_DEFAULT; + flags |= CPP_N_MEDIUM; + } + /* Decode type based on width and properties. */ if (flags & CPP_N_DFLOAT) if ((flags & CPP_N_WIDTH) == CPP_N_LARGE) |