--- 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 at
--- 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 d
--- 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' func
--- 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.
Al
--- 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) __attribute__((non
--- 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 dat
--- 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 an
--- 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
--- 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
--