This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/36166] Use of the 'nonnull' attribute breaks code



------- Comment #6 from pinskia at gcc dot gnu dot org  2008-06-10 09:19 -------
>gcc doesn't just use it for that, it applies two often mutually exclusive interpretations to the same
> attribute.

They are no mutually exclusive at all.  Think of it is this way.  The developer
of the API says that it must be non-NULL so when the developer of the API then
tests for NULLness he is either being stupid or really just thinking that the
user will not use it correctly but since the warning is there, there is no
reason for the function itself to test for NULLness which is why GCC optimizes
away the check.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36166


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]