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

--- Comment #8 from Paul Eggert <eggert at gnu dot org> ---
(In reply to Martin Sebor from comment #7)

> Perhaps what's needed is for GCC to treat the builtins as constant
> expressions when they're invoked with them as operands.  If you agree with
> that approach, I suggest closing this bug and opening a new one with that
> request.

Yes, I already filed a bug report along these lines, as Bug#68120.

> because sophisticated warnings that try to avoid
> issuing false positives for unreachable code (e.g., -Wmaybe-uninutialized)
> depend on optimizations they tend to be inconsistent not only between
> optimization settings but also between different targets.

Yes, that issue is well known. We generally work around the problem by enabling
fancy warnings only on one platform (x86-64) with known settings, and not
bothering with other platforms. A corollary of this practice is that
warning-related GCC bugs tend not to be reported or fixed on platforms other
than x86-64.

However, this workaround does not suffice for -Woverflow because -Woverflow is
enabled by default. This raises the priority of getting -Woverflow right.

Reply via email to