Message ID | 4E78A0EE.7050707@oracle.com |
---|---|
State | New |
Headers | show |
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. Jason
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_type_node. Thanks, I'll finalize the patch later today. Actually I was pretty sure that the check wasn't strictly necessary, ie, we reject __int128 anyway if isn't really available (ie, my first try didn't ice on the testcase without the dg-require on x86_64 -m32) But maybe it's matter of producing a clearer diagnostic? I'll double check.. Thanks, Paolo
Index: decl.c =================================================================== --- decl.c (revision 179007) +++ decl.c (working copy) @@ -8640,6 +8640,10 @@ grokdeclarator (const cp_declarator *declarator, ctype = NULL_TREE; + if (explicit_int128 && pedantic && ! in_system_header) + pedwarn (input_location, OPT_pedantic, + "ISO C++ does not support %<__int128%> for %qs", name); + /* Now process the modifiers that were specified and check for invalid combinations. */ @@ -8695,22 +8699,6 @@ grokdeclarator (const cp_declarator *declarator, if (flag_pedantic_errors) ok = 0; } - if (explicit_int128) - { - if (int128_integer_type_node == NULL_TREE) - { - error ("%<__int128%> is not supported by this target"); - ok = 0; - } - else if (pedantic) - { - pedwarn (input_location, OPT_pedantic, - "ISO C++ does not support %<__int128%> for %qs", - name); - if (flag_pedantic_errors) - ok = 0; - } - } } /* Discard the type modifiers if they are invalid. */