This is the mail archive of the gcc-help@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]

Re: gcc 3.4 Compiler warning


Thx for the quick answer. :)

Christian

Falk Hueffner schrieb:
Christian Ehrlicher <ehrlicher@deneg.de> writes:


I got following warning where I don't expect.
"null argument where non-null required (arg 2)"

memmove(tmp1,0,MY_RET_DEF_SIZ(0));

It works because MY_RET_DEF_SIZ return 0 and so I think the warning
isn't usefull there.


The warning is correct; the standard requires a valid pointer even if
the length is zero. This is not very likely to cause problems with
actual implementations, though.




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