https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124823
Bug ID: 124823
Summary: Dollar signs should generate a pedantic warning
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: luigighiron at gmail dot com
Target Milestone: ---
In C++ dollar signs are not allowed in identifiers, so the following code
should generate an error with -pedantic-errors:
int main(){int $;}
This does not apply to C, which allows implementations to support dollar signs.
Clang does not allow dollar signs with -pedantic-errors in either C or C++.