[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2008-12-23 Thread thutt at vmware dot com
--- Comment #9 from thutt at vmware dot com 2008-12-23 15:44 --- (In reply to comment #1) The compiler may also choose to make optimizations based on the knowledge that certain function arguments will not be null. Witeness the last sentence. If this is the case, then might it not

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2008-04-25 Thread pinskia at gcc dot gnu dot org
--- Comment #8 from pinskia at gcc dot gnu dot org 2008-04-25 20:52 --- *** This bug has been marked as a duplicate of 17308 *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2006-12-01 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-01 22:01 --- nonnull attribute to the function says the function's argument is non null at the time we enter the function so assuming that is correct. Also this is documented this way: nonnull (arg-index, ...) The nonnull

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2006-12-01 Thread madcoder at debian dot org
--- Comment #2 from madcoder at debian dot org 2006-12-01 22:45 --- Please, I'm not telling the behaviour is crazy, it's indeed correct. I'm just asking for a smallish warning that I may be shooting myself in the foot when I do sth like my 'foo' function from the bug report. When you

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2006-12-01 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-12-01 22:49 --- (In reply to comment #2) Please, I'm not telling the behaviour is crazy, it's indeed correct. I'm just asking for a smallish warning that I may be shooting myself in the foot when I do sth like my 'foo'

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2006-12-01 Thread zackw at panix dot com
--- Comment #4 from zackw at panix dot com 2006-12-02 05:19 --- Andrew, please don't close enhancement requests WONTFIX because you think they're too hard to implement. There is no harm in leaving them open in case someone decides that it's not too hard and they're going to code it.

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2006-12-01 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-12-02 05:52 --- The main issue I have emitting a warning here is that it will produce a bunch of false positives for an example: static int f(int *a) { if (a) return *a; return -1; } int g(int *a, int c)

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2006-12-01 Thread zackw at panix dot com
--- Comment #6 from zackw at panix dot com 2006-12-02 06:00 --- Subject: Re: __attribute__((nonull(...))) and silent optimizations Well, it's just like 'may be used uninitialized' false positives, isn't it? The warning shouldn't issue from the VRP pass, we should have some kind of

[Bug c/30043] __attribute__((nonull(...))) and silent optimizations

2006-12-01 Thread zackw at panix dot com
--- Comment #7 from zackw at panix dot com 2006-12-02 06:04 --- Subject: Re: __attribute__((nonull(...))) and silent optimizations Also: my main concern here is not the technical details of the feature but my dislike for your tendency to blow off bug reports that you think are bogus