https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
Bug ID: 105355 Summary: -msmall-data-limit= unexpectedly accepts a separate argument Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: izbyshev at ispras dot ru Target Milestone: --- Target: riscv64-linux-gnu "msmall-data-limit=" is marked as both Joined and Separate at https://gcc.gnu.org/git?p=gcc.git;a=blob;f=gcc/config/riscv/riscv.opt;h=492aad1232404c2711811c3d04f2e02902d1b740;hb=7964ab6c364c410c34efe7ca2eba797d36525349#l95. This is inconsistent with other "-m" options (which permit only joined spelling) and allows strange commands like "riscv64-linux-gnu-gcc -msmall-data-limit= 0 test.c". Note that even if joined spelling is used by the user, GCC driver splits it for the frontend: riscv64-linux-gnu-gcc -msmall-data-limit=0 test.c -### [...] /usr/lib/gcc-cross/riscv64-linux-gnu/10/cc1 -quiet -imultilib . -imultiarch riscv64-linux-gnu test.c -quiet -dumpbase test.c "-mno-small-data-limit=" 0 "-march=rv64imafdc" "-mabi=lp64d" -auxbase test -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccIJvDDO.s [...] This inconsistency unnecessarily complicates life of tools that parse compiler commands (e.g. for static analysis).