On Nov 26, 2018, at 3:07 PM, Jozef Lawrynowicz <joze...@mittosystems.com> wrote:
> 
> On Mon, 26 Nov 2018 12:51:26 -0800
> Mike Stump <mikest...@comcast.net> wrote:
> 
>> On Nov 14, 2018, at 7:56 AM, Jozef Lawrynowicz <joze...@mittosystems.com> 
>> wrote:
>>> 
>>> Patch 5 deals with ISO C errors emitted by tests when the large memory 
>>> model is
>>> used. size_t and ptrdiff_t are __int20 with -mlarge, and if the test is
>>> compiled with -pedantic-errors and -std=* or -ansi, then use of these types
>>> causes an error of the form:
>>> ISO C does not support __int20 types
>>> I fixed this by adding dg-prune-output directives to tests which cause this
>>> error.  
>> 
>> So, it is important that standard code not produce errors.  Kinda 
>> fundamental.
>> 
>> I think this should be fixed in some other way.  If a type is to be used as 
>> a standard type, producing an error for that type's use is wrong.  Instead, 
>> find a way (cough, __extension__), to mark or not warn (error) for it 
>> instead.
> 
> Thanks for the feedback.
> 
>> Can you fix __SIZE_TYPE__ itself to have __extension__ in it?  If not, then 
>> I'd find another way to remove that warning for the type.
> 
> It appears you can actually add __extension__ everywhere (that I tried), 
> except
> for the argument types in the declaration of a function i.e.
>       foo (__extension__ __SIZE_TYPE__ a)
> doesn't work.

Ouch.  Seems like a bug in the parsers.  Could you file a bug report for this 
against C and C++.  Once that bug is fixed, then you can just add __extension__ 
to SIZE_TYPE in your port file.

> So I added __extension__ where possible, and in a couple of other cases I
> instead typedef'd with __extension__.

> Ok for trunk?

No.  I mean, __extension__ should be added in SIZE_TYPE in your port.h file.  
That, or, you need a type that won't complain when used.

Recall, you're not doing the port for the testsuite, you're doing the port for 
users.  Users don't want a ton of warnings or errors when compiling trivial 
standard code.

Reply via email to