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

pskocik at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pskocik at gmail dot com

--- Comment #8 from pskocik at gmail dot com ---
(In reply to Eric Gallager from comment #6)
> (In reply to jos...@codesourcery.com from comment #5)
> > In C, in C11 mode, type qualifiers are completely ignored on function 
> > return types, including not affecting type compatibility, after my commit:
> > 
> > r236231 | jsm28 | 2016-05-13 21:35:39 +0000 (Fri, 13 May 2016) | 46 lines
> > 
> > Implement C11 DR#423 resolution (ignore function return type qualifiers).
> 
> So can this be closed then?

As of 8.2, it doesn't appear to work properly yet.

It looks like the top level qualifs on the return type aren't being ignored
if the return type is sealed in a typedef or __typeof.

typedef int const ic_tp;
int const f(); //ignores the const here
ic_tp f(); //breaks because the const isn't ignored here

Same with:

int const f(); //ignored here
__typeof(int const) f(); //not ignored here

The examples in Godbolt: https://gcc.godbolt.org/z/GVvkmJ

Reply via email to