Re: [C++ Patch] PR 50454 [Take 2]

2011-09-20 Thread Jason Merrill
OK. Jason

Re: [C++ Patch] PR 50454 [Take 2]

2011-09-20 Thread Paolo Carlini
Hi, On 09/21/2011 03:25 AM, Jason Merrill wrote: On 09/20/2011 08:38 PM, Paolo Carlini wrote: + if (int128_integer_type_node == NULL_TREE) +error ("%<__int128%> is not supported by this target"); In this case we should unset explicit_int128. Also remove this code: else if (

Re: [C++ Patch] PR 50454 [Take 2]

2011-09-20 Thread Jason Merrill
On 09/20/2011 08:38 PM, Paolo Carlini wrote: + if (int128_integer_type_node == NULL_TREE) + error ("%<__int128%> is not supported by this target"); In this case we should unset explicit_int128. Also remove this code: else if (explicit_int128 && TREE_CODE (type) != INTEGER_T

Re: [C++ Patch] PR 50454

2011-09-20 Thread Paolo Carlini
Hi, > On 09/20/2011 10:19 AM, Paolo Carlini wrote: >> + if (explicit_int128 && pedantic && ! in_system_header) >> +pedwarn (input_location, OPT_pedantic, >> + "ISO C++ does not support %<__int128%> for %qs", name); > > Yep, like that. But we also want the check for null integer128_t

Re: [C++ Patch] PR 50454

2011-09-20 Thread Jason Merrill
On 09/20/2011 10:19 AM, Paolo Carlini wrote: + if (explicit_int128 && pedantic && ! in_system_header) +pedwarn (input_location, OPT_pedantic, +"ISO C++ does not support %<__int128%> for %qs", name); Yep, like that. But we also want the check for null integer128_type_node. Jas

Re: [C++ Patch] PR 50454

2011-09-20 Thread Paolo Carlini
On 09/20/2011 03:45 PM, Paolo Carlini wrote: On 09/20/2011 03:12 PM, Jason Merrill wrote: No, I think we want to complain about __int128 when -pedantic unless we're in a system header, as C does. The right fix is to move the __int128 code out of the if (unsigned_p || ...) block, and to suppre

Re: [C++ Patch] PR 50454

2011-09-20 Thread Paolo Carlini
On 09/20/2011 03:12 PM, Jason Merrill wrote: No, I think we want to complain about __int128 when -pedantic unless we're in a system header, as C does. The right fix is to move the __int128 code out of the if (unsigned_p || ...) block, and to suppress the pedwarn when in_system_header. Ok, I'l

Re: [C++ Patch] PR 50454

2011-09-20 Thread Jason Merrill
On 09/20/2011 08:09 AM, Paolo Carlini wrote: as I tried to analyze/explain in the audit trail, apparently we are doing something bogus in grokdeclarator wrt unsigned __int128, which leads to the latter being wrongly rejected with -pedantic-errors, at variance with plain __int128 or __int128_t / _