Patch: New null_terminated attribute for C/C++

Tom Tromey tromey@redhat.com
Mon Oct 14 10:31:00 GMT 2002


>>>>> "Fergus" == Fergus Henderson <fjh@cs.mu.oz.au> writes:

Fergus> I think -Wnull-termination should get enabled by -Wall.

Joseph asked for it to be enabled by -Wformat, which is enabled by
-Wall.

Fergus> I think it would be best to separate out the check for
Fergus> POINTER_TYPE and issue a different warning message in that
Fergus> case.

Ok.

Fergus> Also, if there are no arguments at all, the message "non-null
Fergus> argument terminator", although not likely to cause confusion,
Fergus> is nevertheless not correct.

Yeah.  Can't we just ignore the case where there are no arguments at
all?  Won't the user always get some other error?

Tom



More information about the Gcc-patches mailing list