This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/66880] 'error: case label does not reduce to an integer constant' with -fsanitize=shift -std=gnu99.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66880

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
It would be better to make the C FE reject this as constant expression which
invokes undefined behavior.

IMHO -fsanitize should never sanitize any constant expression - the FE will
reject non-constant ones anyway.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]