public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
@ 2012-05-23 14:51 dominiq at lps dot ens.fr
  2012-05-24 18:45 ` [Bug bootstrap/53459] " dodji at seketeli dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-05-23 14:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

             Bug #: 53459
           Summary: ../../work/libcpp/lex.c:593:18: error: typedef
                    'check_count' locally defined but not used
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: dodji@gcc.gnu.org
              Host: powerpc-apple-darwin9
            Target: powerpc-apple-darwin9
             Build: powerpc-apple-darwin9


On powerpc-apple-darwin9 bootstrap failed at r187775 with

...
/opt/gcc/darwin_buildw/./prev-gcc/g++ -B/opt/gcc/darwin_buildw/./prev-gcc/
-B/opt/gcc/gcc4.8w/powerpc-apple-darwin9.8.0/bin/ -nostdinc++
-B/opt/gcc/darwin_buildw/prev-powerpc-apple-darwin9.8.0/libstdc++-v3/src/.libs
-B/opt/gcc/darwin_buildw/prev-powerpc-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs
-I/opt/gcc/darwin_buildw/prev-powerpc-apple-darwin9.8.0/libstdc++-v3/include/powerpc-apple-darwin9.8.0
-I/opt/gcc/darwin_buildw/prev-powerpc-apple-darwin9.8.0/libstdc++-v3/include
-I/opt/gcc/work/libstdc++-v3/libsupc++
-L/opt/gcc/darwin_buildw/prev-powerpc-apple-darwin9.8.0/libstdc++-v3/src/.libs
-L/opt/gcc/darwin_buildw/prev-powerpc-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs
 -I../../work/libcpp -I. -I../../work/libcpp/../include -I./../intl
-I../../work/libcpp/include  -g -O2 -mdynamic-no-pic -gtoggle -W -Wall
-Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic
-Wno-long-long -Werror -fno-exceptions -fno-rtti -I../../work/libcpp -I.
-I../../work/libcpp/../include -I./../intl -I../../work/libcpp/include  -c -o
lex.o -MT lex.o -MMD -MP -MF .deps/lex.Tpo ../../work/libcpp/lex.c
../../work/libcpp/lex.c: In function 'const uchar* search_line_fast(const
uchar*, const uchar*)':
../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined
but not used [-Werror=unused-local-typedefs]
     typedef char check_count[(N == 2 || N == 4) * 2 - 1];

AFAICT check_count is indeed unused and removing the line allows bootstrap to
complete. This has probably been exposed by r187757.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
@ 2012-05-24 18:45 ` dodji at seketeli dot org
  2012-05-24 20:14 ` dodji at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at seketeli dot org @ 2012-05-24 18:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

--- Comment #1 from dodji at seketeli dot org <dodji at seketeli dot org> 2012-05-24 18:43:52 UTC ---
Right, and there is:

#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)

right before the offending line, which explains why I haven't seen the
bootstrap error before committing, as I don't run any ALTIVEC system.

I'll cook up a patch for this.  Thank you for filling this bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
  2012-05-24 18:45 ` [Bug bootstrap/53459] " dodji at seketeli dot org
@ 2012-05-24 20:14 ` dodji at gcc dot gnu.org
  2012-05-24 21:06 ` dodji at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-24 20:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-05-24
         AssignedTo|unassigned at gcc dot       |dodji at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
  2012-05-24 18:45 ` [Bug bootstrap/53459] " dodji at seketeli dot org
  2012-05-24 20:14 ` dodji at gcc dot gnu.org
@ 2012-05-24 21:06 ` dodji at gcc dot gnu.org
  2012-05-24 21:07 ` dodji at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-24 21:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-24 21:05:55 UTC ---
Author: dodji
Date: Thu May 24 21:05:49 2012
New Revision: 187853

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187853
Log:
PR bootstrap/53459 - unused local typedef when building on altivec

libcpp/

    PR bootstrap/53459
    * lex.c (search_line_fast): Remove unused typedef check_count.

Modified:
    trunk/libcpp/ChangeLog
    trunk/libcpp/lex.c


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2012-05-24 21:06 ` dodji at gcc dot gnu.org
@ 2012-05-24 21:07 ` dodji at gcc dot gnu.org
  2012-05-24 21:50 ` dodji at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-24 21:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-24 21:05:55 UTC ---
Author: dodji
Date: Thu May 24 21:05:49 2012
New Revision: 187853

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187853
Log:
PR bootstrap/53459 - unused local typedef when building on altivec

libcpp/

    PR bootstrap/53459
    * lex.c (search_line_fast): Remove unused typedef check_count.

Modified:
    trunk/libcpp/ChangeLog
    trunk/libcpp/lex.c

--- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-24 21:06:24 UTC ---
Fixed in trunk (4.8).


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2012-05-24 21:07 ` dodji at gcc dot gnu.org
@ 2012-05-24 21:50 ` dodji at gcc dot gnu.org
  2012-05-25  6:56 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-24 21:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

--- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-24 21:06:24 UTC ---
Fixed in trunk (4.8).


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2012-05-24 21:50 ` dodji at gcc dot gnu.org
@ 2012-05-25  6:56 ` jakub at gcc dot gnu.org
  2012-05-25  8:53 ` dodji at seketeli dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-25  6:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-25 06:40:25 UTC ---
The typedef has been there as kind of static assertion.
IMHO it would be better to replace it with
extern char check_count[(N == 2 || N == 4) * 2 - 1];
or something similar.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2012-05-25  6:56 ` jakub at gcc dot gnu.org
@ 2012-05-25  8:53 ` dodji at seketeli dot org
  2012-05-29  9:50 ` dodji at gcc dot gnu.org
  2012-05-29  9:58 ` dodji at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at seketeli dot org @ 2012-05-25  8:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

--- Comment #5 from dodji at seketeli dot org <dodji at seketeli dot org> 2012-05-25 08:37:05 UTC ---
> The typedef has been there as kind of static assertion.
> IMHO it would be better to replace it with
> extern char check_count[(N == 2 || N == 4) * 2 - 1];
> or something similar.

Right.  Here is the follow-up I have posted to the list:
http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01684.html


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
                   ` (6 preceding siblings ...)
  2012-05-25  8:53 ` dodji at seketeli dot org
@ 2012-05-29  9:50 ` dodji at gcc dot gnu.org
  2012-05-29  9:58 ` dodji at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-29  9:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

--- Comment #6 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-29 09:42:44 UTC ---
Author: dodji
Date: Tue May 29 09:42:39 2012
New Revision: 187947

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187947
Log:
PR bootstrap/53459 - unused local typedef when building on altivec

    PR bootstrap/53459
    * lex.c (search_line_fast): Avoid unused local typedefs to simulate
    a static assertion.

Modified:
    trunk/libcpp/ChangeLog
    trunk/libcpp/lex.c


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug bootstrap/53459] ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used
  2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
                   ` (7 preceding siblings ...)
  2012-05-29  9:50 ` dodji at gcc dot gnu.org
@ 2012-05-29  9:58 ` dodji at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-29  9:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53459

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-29 09:49:42 UTC ---
Hopefully properly fixed for 4.8 now.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-05-29  9:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-23 14:51 [Bug bootstrap/53459] New: ../../work/libcpp/lex.c:593:18: error: typedef 'check_count' locally defined but not used dominiq at lps dot ens.fr
2012-05-24 18:45 ` [Bug bootstrap/53459] " dodji at seketeli dot org
2012-05-24 20:14 ` dodji at gcc dot gnu.org
2012-05-24 21:06 ` dodji at gcc dot gnu.org
2012-05-24 21:07 ` dodji at gcc dot gnu.org
2012-05-24 21:50 ` dodji at gcc dot gnu.org
2012-05-25  6:56 ` jakub at gcc dot gnu.org
2012-05-25  8:53 ` dodji at seketeli dot org
2012-05-29  9:50 ` dodji at gcc dot gnu.org
2012-05-29  9:58 ` dodji at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).