[Bug c++/85775] False positive with -Wparentheses

2023-03-24 Thread markus-t314 at gmx dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85775

--- Comment #3 from markus  ---
Worked until 7.5, fails since 8.1 and still fails in 12.2

[Bug c++/85775] False positive with -Wparentheses

2023-03-24 Thread markus-t314 at gmx dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85775

markus  changed:

   What|Removed |Added

 CC||markus-t314 at gmx dot de

--- Comment #2 from markus  ---
Maybe a simpler example:

struct Foo {
int num;
};

struct S {
static Foo f;
};

// error: 'S' in 'struct Foo' does not name a type
//Foo ::S::f = Foo{23};

// warning: unnecessary parentheses in declaration of 'f' [-Wparentheses]
Foo (::S::f) = Foo{23};


Parantheses are necessary if global scope resolution is wanted/needed,
otherwise they would refer to the class Foo.

https://godbolt.org/z/7d39rbv7o

[Bug c++/85775] False positive with -Wparentheses

2022-01-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85775

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2022-01-07
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed.