[Bug c/69972] duplicate integer overflow diagnostic in constant expressions
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 29 10:59:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69972
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The first warning is shown by default and comes from parser_build_binary_op:
3612 if (TREE_OVERFLOW_P (result.value)
3613 && !TREE_OVERFLOW_P (arg1.value)
3614 && !TREE_OVERFLOW_P (arg2.value))
3615 overflow_warning (location, result.value);
The second is emitted with -Wpedantic in build_enumerator:
8199 constant_expression_warning (value);
More information about the Gcc-bugs
mailing list