Bug#123468: [Bug c/6906] warn about asserts with side effects
- To: 123468@bugs.debian.org
- Subject: Bug#123468: [Bug c/6906] warn about asserts with side effects
- From: "felix.von.s at posteo dot de" <gcc-bugzilla@gcc.gnu.org>
- Date: Mon, 17 Jul 2017 13:29:28 +0000
- Message-id: <bug-6906-1490-Sk2Iwfp9Mz@http.gcc.gnu.org/bugzilla/>
- Reply-to: "felix.von.s at posteo dot de" <gcc-bugzilla@gcc.gnu.org>, 123468@bugs.debian.org
- In-reply-to: <bug-6906-1490@http.gcc.gnu.org/bugzilla/>
- References: <bug-6906-1490@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6906
felix <felix.von.s at posteo dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |felix.von.s at posteo dot de
--- Comment #7 from felix <felix.von.s at posteo dot de> ---
What's wrong with the __builtin_pure_p approach? Sure, the diagnostics
generated by __attribute__((warning)) will be ugly, but it's still something.
It's also very simple to implement: it's just !TREE_SIDE_EFFECTS().
In fact, I patched my copy of GCC to add __builtin_pure_p defined just like
that and it seems to work fine. Might submit it soon (I didn't write any tests,
though).
--
You are receiving this mail because:
You reported the bug.
Reply to: