Neil Conway <neilc@samurai.com> writes:
>>> -Wmissing-declarations ("Warn if a global function is defined without a
>>> previous declaration.")
>>
>> Hm? We have always used that one.
> We've always used -Wmissing-prototypes.
We've always used both. See Makefile.global.in:
ifeq ($(GCC), yes) CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations
endif
> ... Which doesn't make the difference in behavior between the two options
> clear to me. Can anyone clarify this?
Hmm, it looks like -Wmissing-prototypes may be a superset of
-Wmissing-declarations --- it seems to say that the latter will be
content with a K&R style declaration ("extern int foo();") but the
former will not. If that's a correct reading then we could drop
-Wmissing-declarations.
regards, tom lane