[PATCH, PR52654, C++11] Warn on overflow in user-defined literals

Jason Merrill jason@redhat.com
Thu Nov 29 00:31:00 GMT 2012


On 11/28/2012 06:13 PM, Ed Smith-Rowland wrote:
> Ultimately we should probably revisit this and 54413 by parsing the literal
> numbers in the C++ front end.  That won't happen for 4.8.

That sounds like you're proposing to duplicate code?

> -  /* Both C and C++ require a diagnostic for a floating constant
> -     outside the range of representable values of its type.  Since we
> -     have __builtin_inf* to produce an infinity, this is now a
> -     mandatory pedwarn if the target does not support infinities.  */
> +      /* Both C and C++ require a diagnostic for a floating constant
> +	 outside the range of representable values of its type.  Since we
> +	 have __builtin_inf* to produce an infinity, this is now a
> +	 mandatory pedwarn if the target does not support infinities.  */

This seems unintentional.

OK with that indentation change removed.

Jason



More information about the Gcc-patches mailing list