https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #39 from Pekka ---
Well this change did now hit me.
We have a code base of thousands of modules for a set of industrial systems.
Every now and then we must recompile for new platforms with new versions of
things like gcc. And now is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Martin Sebor changed:
What|Removed |Added
CC||mueller at kde dot org
--- Comment #38 fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #37 from Andrew Pinski ---
Note this change also introduces some warnings when compiling the arm64 kernel:
In file included from arch/arm64/crypto/aes-glue.c:17:0:
include/linux/cpufeature.h:48:33: warning: ‘cpu_feature_match_AES’ de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Mark Wielaard changed:
What|Removed |Added
Status|REOPENED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #35 from Mark Wielaard ---
Note the followup patch needed for PR c/69911
https://gcc.gnu.org/viewcvs?rev=233627&root=gcc&view=rev
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #33 from Andreas Schwab ---
make[3]: Entering directory '/opt/gcc/test/Build/lto-plugin'
/bin/sh ./libtool --tag=CC --tag=disable-static --mode=compile
/opt/gcc/test/Build/./prev-gcc/xgcc -B/opt/gcc/test/Build/./prev-gcc/
-B/usr/aarc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #32 from Mark Wielaard ---
Author: mark
Date: Mon Feb 22 22:42:19 2016
New Revision: 233616
URL: https://gcc.gnu.org/viewcvs?rev=233616&root=gcc&view=rev
Log:
PR28901 Add two levels for -Wunused-const-variable.
There is some controv
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #31 from Manuel López-Ibáñez ---
(In reply to Mark Wielaard from comment #29)
> > > + || filename_cmp (main_input_filename,
> > > +DECL_SOURCE_FILE (decl)) == 0)))
> >
> > Better
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #30 from Mark Wielaard ---
https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01433.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #29 from Mark Wielaard ---
(In reply to Manuel López-Ibáñez from comment #27)
> (In reply to Mark Wielaard from comment #21)
> > Although in C a static const is not really like a #define I suspect that
> > there are cases where they a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #28 from Mark Wielaard ---
(In reply to Panu Matilainen from comment #26)
> On main files warning on unused junk is certainly useful but static const is
> commonly and deliberately used in headers (eg for arrays such as in comment
> #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #27 from Manuel López-Ibáñez ---
(In reply to Mark Wielaard from comment #21)
> Although in C a static const is not really like a #define I suspect that
> there are cases where they are used as such in header files. If that is the
> m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Panu Matilainen changed:
What|Removed |Added
CC||pmatilai at laiskiainen dot org
--- Co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #25 from Mark Wielaard ---
(In reply to Josh Triplett from comment #23)
> (In reply to Mark Wielaard from comment #21)
> > Although in C a static const is not really like a #define
>
> Why not? Many C projects try to avoid the prepr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #24 from Josh Triplett ---
Also, even the documentation seems unfortunate: "In C++ this is normally not an
error since const variables take the place of #defines in C++."
Why would C code not do this too? The GCC documentation shoul
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Josh Triplett changed:
What|Removed |Added
CC||josh at joshtriplett dot org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #22 from Chen Gang ---
(In reply to Mark Wielaard from comment #21)
[...]
> Although in C a static const is not really like a #define I suspect that
> there are cases where they are used as such in header files. If that is the
> maj
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #21 from Mark Wielaard ---
Sorry, I forgot about this bug still being open.
It isn't clear to me whether the issues seen in the kernel sources are
a) just legitimate and should be fixed
(like comment #16 seem to imply)
b) thousand
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #20 from Chen Gang ---
(In reply to Chen Gang from comment #19)
> I build linux kernel with allyesconfig under x86_64 for linux-next tree
> 20160122. I can find some related cases for BUG28901 (but they are not quite
> much), one case
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #19 from Chen Gang ---
I build linux kernel with allyesconfig under x86_64 for linux-next tree
20160122. I can find some related cases for BUG28901 (but they are not quite
much), one case is below:
CC drivers/acpi/sbshc.o
In f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #18 from Markus Trippelsdorf ---
Here is an example:
...
static const struct pt_regs_offset x86_32_regoffset_table[] = {
REG_OFFSET_NAME_32("%ax", eax),
REG_OFFSET_NAME_32("%cx", ecx),
REG_OFFSET_NA
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #17 from Andi Kleen ---
There were a few false or useless ones (e.g. related to macros and specific
build configs). I didn't look through them all, but various were semi
legitimate, but also very minor (small) so fixing it won't help
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Markus Trippelsdorf changed:
What|Removed |Added
CC||trippels at gcc dot gnu.org
--- Co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #15 from Mark Wielaard ---
(In reply to Andi Kleen from comment #14)
> I'm building a current Linux kernel with allyesconfig, and this new warning
> causes
> 1383(!) new warnings in the build.
>
> I think this should be revisited and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Andi Kleen changed:
What|Removed |Added
CC||andi-gcc at firstfloor dot org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #13 from Manuel López-Ibáñez ---
(In reply to Paul Eggert from comment #12)
> (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)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #12 from Paul Eggert ---
(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 reasonab
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Manuel López-Ibáñez changed:
What|Removed |Added
CC||manu at gcc dot gnu.org
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Paul Eggert changed:
What|Removed |Added
CC||eggert at gnu dot org
--- Comment #10 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #9 from Mark Wielaard ---
Author: mark
Date: Mon Sep 14 09:49:47 2015
New Revision: 227742
URL: https://gcc.gnu.org/viewcvs?rev=227742&root=gcc&view=rev
Log:
PR28901 -Wunused-variable ignores unused const initialised variables in C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #8 from Mark Wielaard ---
Submitted a patch:
https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00847.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
petschy at gmail dot com changed:
What|Removed |Added
CC||petschy at gmail dot com
--- C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Tom Tromey changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Last reconfirmed|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Tom Tromey changed:
What|Removed |Added
CC||tromey at gcc dot gnu.org
--- Comment #5 fro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #4 from H.J. Lu ---
(In reply to Andrew Pinski from comment #3)
> From the code:
>/* We don't warn about "static const" variables because the
> "rcs_id" idiom uses that construction. */
That is not a good reason not t
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
--- Comment #3 from Andrew Pinski ---
>From the code:
/* We don't warn about "static const" variables because the
"rcs_id" idiom uses that construction. */
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901
Andrew Pinski changed:
What|Removed |Added
CC||hjl.tools at gmail dot com
--- Comment #2
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-19 05:13 ---
This is not a bug but a feature. The reason is that const int usually shows up
in header files and usually are normally unused.
--
pinskia at gcc dot gnu dot org changed:
What|Removed
39 matches
Mail list logo