This is the mail archive of the
mailing list for the GCC project.
Re: Should gcc give warning for this case?
Qun-Ying <email@example.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
Freebooter, n. A conqueror in a small way of business, whose annexations lack
of the sanctifying merit of magnitude.