Issue 61582
Summary Spurious -Wpre-c++2b-compat warning with -std=c++2b -pedantic
Labels new issue
Assignees
Reporter timsong-cpp
    ```cpp
struct A {
    void operator[](int, int);
};
```

with `-std=c++2b -pedantic` (https://gcc.godbolt.org/z/qnjd5YhPa):

```
<source>:2:10: warning: overloaded 'operator[]' with more than one parameter is a C++2b extension [-Wpre-c++2b-compat]
    void operator[](int, int);
         ^
1 warning generated.
```

I would not have expected `-pedantic` to warn me about constructs that are ill-formed in a previous standard.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to