From b0d72f0d7ad6703e4a6d78b99590ac1fbcb716fb Mon Sep 17 00:00:00 2001 From: pfg Date: Sun, 12 May 2013 15:29:35 +0000 Subject: 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 --- contrib/gcc/c-lex.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'contrib/gcc') 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) -- cgit v1.1