[Bug c++/83592] New: [8 Regression] Annoying -Wparentheses warnings
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 26 14:36:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83592
Bug ID: 83592
Summary: [8 Regression] Annoying -Wparentheses warnings
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: nathan at gcc dot gnu.org
Target Milestone: ---
Building anything QT related gives many annoying -Wparentheses warnings, e.g.:
% cat test.ii
int* foo(long &a) { return reinterpret_cast<int(*)>(&a); }
% g++ -Wall -c test.ii
test.ii: In function ‘int* foo(long int&)’:
test.ii:1:48: warning: unnecessary parentheses in declaration of ‘type name’
[-Wparentheses]
int* foo(long &a) { return reinterpret_cast<int(*)>(&a); }
^
I don't see what harm these parentheses could cause in this context.
More information about the Gcc-bugs
mailing list