This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/28901] -Wunused-variable ignores unused const initialised variables


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901

--- Comment #12 from Paul Eggert <eggert at gnu dot org> ---
(In reply to Manuel LÃpez-IbÃÃez from comment #11)

> Another alternative is to only warn if the variable is defined in the main
> file (MAIN_FILE_P) as opposed to an included file.

Thanks, this is a reasonable suggestion; it would fix the cry-wolf problem for
tzcode, which is what prompted me to object to the original proposal.

The alternative of littering the code with many instances of __attribute__
((unused)) (or is it __attribute ((used)? I can never remember) is less
appealing.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]