This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should gcc give warning for this case?
Qun-Ying <zhu.qunying@gmail.com> writes:
> No warning at all. Should gcc warn about the *next pointer points to
> an unknown structure? I know it is allow by the standard, but most of
> the case, it indicates some error in the code.
Hmm? Where do you expect to warn?
You never dereference the pointer, so there's no error, and
un-dereferenced pointers to unknown structures are not uncommon in C
programs, so a warning about this would result in many false
positives...
-miles
--
Freebooter, n. A conqueror in a small way of business, whose annexations lack
of the sanctifying merit of magnitude.