[Bug c/97702] New: comma operator does not drop qualifiers during lvalue conversion
uecker at eecs dot berkeley.edu
gcc-bugzilla@gcc.gnu.org
Tue Nov 3 14:48:23 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97702
Bug ID: 97702
Summary: comma operator does not drop qualifiers during lvalue
conversion
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: uecker at eecs dot berkeley.edu
Target Milestone: ---
The following code
const int x = 0;
typeof(0, x) y = 0;
y = x;
yields an error because '(0, x)' and then 'y' is const
qualified. This is incorrect as lvalue conversion
should remove the qualifier (ISO C17 6.3.2.1p2).
I assume this is a residual problem from the time
where GCC had generalized lvalues.
More information about the Gcc-bugs
mailing list