https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78696

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
The radix character is not a POSIX extension.  See the C11 7.1.1#2: "The 
decimal-point character is the character used by functions that convert 
floating-point numbers to or from character sequences to denote the 
beginning of the fractional part of such character sequences. 180) It is 
represented in the text and examples by a period, but may be changed by 
the setlocale function." (that wording dates back to C90).  It's grouping, 
indicated by the ' flag, that's a POSIX extension.

I tend to agree that this option is not yet ready to enable by default.  
It also risks introducing buffer overruns on systems where printf doesn't 
quite follow the standard interpretation followed by the implementation of 
the option.  (E.g. some versions of Windows printf functions always use a 
3-digit exponent even when standard C would require a 2-digit exponent.  
Do you allow for that?)

Reply via email to