Linker warning messages should have the word 'warning' in them.
Zack Weinberg
zack@codesourcery.com
Fri Aug 1 07:45:00 GMT 2003
Someone reported a non-bug in gcc which boils down to their having
been confused by the pair of linker diagnostics
session.c:450: the use of `tmpnam' is dangerous, better use `mkstemp'
session.c:452: undefined reference to `errno'
They thought that the first diagnostic was an error, couldn't figure
out any way around it, and asked for help. In fact, that diagnostic
is only a warning; the showstopper problem with the program is
indicated by the second message, which they ignored, probably on the
theory that there was no point looking at it until the first one had
been dealt with. Both these diagnostics look equally important to a
naive user; there is no way they could be expected to know that the
first message is a warning and the second an error.
This warning message ultimately comes from glibc, via a .gnu.warning
section. May I suggest that all such messages be modifed to have
"warning: " at the beginning, so it is obvious that they are not
errors?
zw
More information about the Libc-alpha
mailing list