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

            Bug ID: 127192
           Summary: -Wunused-value warns about unused static_assert in
                    expression
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eczbek.void at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/G8fa5W7WM

```
int main() {
        static_assert(true), (void)0;
}
```

```
<source>: In function 'main':
<source>:2:28: warning: left-hand operand of comma expression has no effect
[-Wunused-value]
    2 |         static_assert(true), (void)0;
      |                            ^
```
  • [Bug c/127192] New: -Wunused-val... eczbek.void at gmail dot com via Gcc-bugs

Reply via email to