[Bug c/88582] New: GCC does not unqualify return types in the case of _Atomic qualified return type.
anders.granlund.0 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Dec 23 17:07:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88582
Bug ID: 88582
Summary: GCC does not unqualify return types in the case of
_Atomic qualified return type.
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: anders.granlund.0 at gmail dot com
Target Milestone: ---
Test case (prog.c):
int main()
{
typedef _Atomic int f();
typedef int f();
}
Compilation command line:
gcc prog.c -Wall -Wextra -std=c11 -pedantic-errors
Observed behaviour:
The following error message was outputed:
error: conflicting types for 'f'
Expected behaviour:
No error message. Return types of function types are always unqualified, so
both typedefs defines f to be the same type: 'int ()'.
References to the standard:
6.7.6.5 ( "... returning the unqualified version of T" )
More information about the Gcc-bugs
mailing list