[Bug c/68612] Const-compatibility in C
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue Dec 1 23:36:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68612
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
I'd consider this a reasonable extension (not suitable for adding while
trunk is in bug-fixing mode, of course) for default (non-pedantic) mode,
similar to the extension to use C++-like rules for arrays of qualified
type. Similar to that, it requires a lot of care to make sure it doesn't
cause valid code to be rejected, as well as thorough testcases.
(To be clear, the C++ rule is not symmetric between const and other
qualifiers; it allows adding arbitrary qualifiers in certain places if
const is present at all levels of indirection beyond those where any
qualifiers are added. For this purpose, in C, _Atomic should not be
considered a qualifier, and you'd need to think about how address space
qualifiers are involved.)
More information about the Gcc-bugs
mailing list