[Bug c/68687] New: C compiler options to ignore all const qualifiers
alexreg at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Dec 4 00:28:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68687
Bug ID: 68687
Summary: C compiler options to ignore all const qualifiers
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: alexreg at gmail dot com
Target Milestone: ---
Const-correctness often becomes very difficult for large and complex programs,
due to the finicky nature in which it is implemented. (In my view, the fact
that it qualifies types and not values is big design mistake.) Many C (and C++)
programmers do not like to have to worry about const-correctness at all, as
they feel the troubles outweigh the benefits.
At the moment, for the compiler to effectively ignore const qualifiers, I have
to do something that is overkill – namely, specify the
`-Wno-incompatible-pointer-types` and
`-Wno-incompatible-pointer-types-discards-qualifiers` options to the driver.
This is less than ideal, since the former removes some much more useful
warnings that have nothing to do with the const qualifiers.
Could we implement a feature that just ignores all const qualifiers when
compiling?
More information about the Gcc-bugs
mailing list