This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: new __strtol warning
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Thu, 13 Nov 2014 14:15:41 -0800 (PST)
- Subject: Re: new __strtol warning
- Authentication-results: sourceware.org; auth=none
- References: <20141113211039 dot 883652C3B16 at topped-with-meat dot com> <alpine dot DEB dot 2 dot 10 dot 1411132138170 dot 5050 at digraph dot polyomino dot org dot uk>
> Using plain -Werror seems better than enabling it for particular warnings
> only - we just need an appropriate policy on selective disabling of
> warnings.
I was thinking that we could start with -Werror=foo for enabling things
piecemeal before we figure out everything we'd need to do for blanket
-Werror not to break. And if we support a --disable-werror for older
compilers or whatnot (as vapier wanted), then -Werror=foo for specific safe
ones like strict-prototypes might make sense in that case too (though it's
probably fine for --disable-werror to disable all -Werrorness).
> I've committed this patch that fixes those warnings by using a prototype
> definition for __strtol.
Thanks.
> > 3. Rework your change so that it does not use the name __strtol at all,
> > while still using __strtoull et al. This is the ideal solution for this
> > case, because strtol is a C89 function and so __strtol will never be
> > used anywhere. It's always nice to clean the symbol table of useless
> > symbols and have the DWARF data use the canonical name for a function.
>
> That seemed an excessive complication (as the extra name is harmless and
> simplifies the code).
Fair enough. Extra names might be considered almost entirely harmless
(inflating .symtab alone is arguably no real harm). But changing the
primary name of a function is some small harm, because it changes the DWARF
info and thus what name people see in a debugger.