[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #12 from Jakub Jelinek --- Author: jakub Date: Sat Mar 3 13:43:30 2018 New Revision: 258208 URL: https://gcc.gnu.org/viewcvs?rev=258208=gcc=rev Log: Backported from mainline 2018-03-02 Jakub Jelinek

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-03-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #11 from Jakub Jelinek --- Author: jakub Date: Fri Mar 2 16:19:43 2018 New Revision: 258140 URL: https://gcc.gnu.org/viewcvs?rev=258140=gcc=rev Log: PR ipa/84628 * expr.c (expand_expr_real_1) : Don't emit

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #10 from Jakub Jelinek --- Created attachment 43533 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43533=edit gcc8-pr84628.patch Untested fix.

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #9 from Andrew Pinski --- deprecated deprecated (msg) The deprecated attribute results in a warning if the function is used anywhere in the source file. This is useful when identifying functions that are expected to be removed in a

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread jay.krell at cornell dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #8 from Jay --- Aha, kinda the same thing, but before or after analysis. And this “deprecated” somewhat matches msvc - I was wondering about that but didn’t see it. It’d be nice to be able to customize the deprecated message but

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #7 from Jakub Jelinek --- The warning/error attributes have been added for purposes like glibc memset inline, which does: if (__builtin_constant_p (__len) && __len == 0 && (!__builtin_constant_p (__ch) || __ch != 0)) {

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread jay.krell at cornell dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #6 from Jay --- Misplaced comment: But, the thing is, because optimization can remove the use of such functions, people are now advocating that we noinline along with the attribute, which hypothetically is unwarranted damage.

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread jay.krell at cornell dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #5 from Jay --- I know. We just noticed and were surprised. It isn't clear if this is what users would expect or not. Warn because they wrote code that "merely looks bad", or only if the compiler decides after analysis that it really

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #4 from Andrew Pinski --- (In reply to Jay from comment #3) > The original case said something about "localalias" in the error, so aliases > don't seem to address it. I can dig that up probably. > > Shouldn't it warn for: > if (0)

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread jay.krell at cornell dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 --- Comment #3 from Jay --- The original case said something about "localalias" in the error, so aliases don't seem to address it. I can dig that up probably. Shouldn't it warn for: if (0) banned_function() ? I believe we want it to. You

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-02-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|