public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
@ 2012-05-27 23:26 tkoenig at gcc dot gnu.org
  2012-05-27 23:42 ` [Bug c/53502] " tkoenig at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-05-27 23:26 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53502
           Summary: [4.8 Regression] Bootstrap broken with
                    --disable-build-poststage1-with-cxx
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


../trunk/configure --prefix=$HOME --enable-languages=c,fortran
--disable-build-poststage1-with-cxx

The error was:

../../trunk/gcc/fortran/decl.c: In function 'match_attr_spec':
../../trunk/gcc/fortran/decl.c:3276:3: error: typedef 'decl_types' locally
defined but not used [-Werror=unused-local-typedefs]
decl_types;
^
cc1: all warnings being treated as errors
make[3]: *** [fortran/decl.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/ig25/Gcc/trunk-bin/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/ig25/Gcc/trunk-bin'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/ig25/Gcc/trunk-bin'
make: *** [all] Error 2

Reduced test case:

ig25@linux-fd1f:~/Krempel/Boot> gcc -Werror -Wall foo.c
foo.c: In function 'bar':
foo.c:6:5: error: typedef 'foo' locally defined but not used
[-Werror=unused-local-typedefs]
   } foo;
     ^
cc1: all warnings being treated as errors
ig25@linux-fd1f:~/Krempel/Boot> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ig25/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../trunk/configure --prefix=/home/ig25
--enable-languages=c,fortran
Thread model: posix
gcc version 4.8.0 20120527 (experimental) (GCC) 
ig25@linux-fd1f:~/Krempel/Boot> 

4.6.2 doesn't warn.


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
@ 2012-05-27 23:42 ` tkoenig at gcc dot gnu.org
  2012-05-28  2:26 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-05-27 23:42 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
      Known to work|                            |4.6.2
   Target Milestone|---                         |4.8.0
      Known to fail|                            |4.8.0

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-05-27 23:25:50 UTC ---
Better with source to the test case...

int bar(void)
{
  typedef enum
  {
    ZERO=0, ONE
  } foo;

  return ONE;
}


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
  2012-05-27 23:42 ` [Bug c/53502] " tkoenig at gcc dot gnu.org
@ 2012-05-28  2:26 ` pinskia at gcc dot gnu.org
  2012-05-28  8:27 ` mikpe at it dot uu.se
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-28  2:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-27 23:42:17 UTC ---
The warning is correct, the typedef is unused.  The enum is not but the typedef
to the enum is unused.


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
  2012-05-27 23:42 ` [Bug c/53502] " tkoenig at gcc dot gnu.org
  2012-05-28  2:26 ` pinskia at gcc dot gnu.org
@ 2012-05-28  8:27 ` mikpe at it dot uu.se
  2012-05-28 14:57 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mikpe at it dot uu.se @ 2012-05-28  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2012-05-28 08:00:18 UTC ---
(In reply to comment #0)
> ../trunk/configure --prefix=$HOME --enable-languages=c,fortran
> --disable-build-poststage1-with-cxx
> 
> The error was:
> 
> ../../trunk/gcc/fortran/decl.c: In function 'match_attr_spec':
> ../../trunk/gcc/fortran/decl.c:3276:3: error: typedef 'decl_types' locally
> defined but not used [-Werror=unused-local-typedefs]
> decl_types;
> ^

I got the same error.  Deleting the unused type name and the 'typedef' keyword
restores bootstrap for me.


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-05-28  8:27 ` mikpe at it dot uu.se
@ 2012-05-28 14:57 ` dominiq at lps dot ens.fr
  2012-05-28 15:28 ` dominiq at lps dot ens.fr
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-05-28 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-05-28 14:48:07 UTC ---
Any idea why this does not happen without --disable-build-poststage1-with-cxx?


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-05-28 14:57 ` dominiq at lps dot ens.fr
@ 2012-05-28 15:28 ` dominiq at lps dot ens.fr
  2012-05-28 15:53 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-05-28 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-28
     Ever Confirmed|0                           |1

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-05-28 15:17:02 UTC ---
Confirmed for r187834 on x86_64-apple-darwin10.


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-05-28 15:28 ` dominiq at lps dot ens.fr
@ 2012-05-28 15:53 ` jakub at gcc dot gnu.org
  2012-05-29  9:27 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-28 15:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-28 15:52:39 UTC ---
I believe because for C++ that kind of typedef isn't useless when the enum is
anonymous - the typedef gives it a name.
On
int
foo ()
{
  typedef enum { A = 1 } E1, E2;
  typedef enum E { B = 1 } E3, E4;
  return A + B;
}

C warns about E{1,2,3,4}, while C++ warns just about E{2,3,4}, but not E1.


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-05-28 15:53 ` jakub at gcc dot gnu.org
@ 2012-05-29  9:27 ` burnus at gcc dot gnu.org
  2012-05-30 16:52 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-05-29  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-29 09:24:01 UTC ---
I have no comment regarding the C/C++ warning, but I think on the gfortran side
the following patch makes sense.

--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -3266,3 +3266,3 @@ match_attr_spec (void)
   /* Modifiers that can exist in a type statement.  */
-  typedef enum
+  enum
   { GFC_DECL_BEGIN = 0,


I was thinking of the following patch, but it won't work as g++ doesn't like
the "d++" in
  for (d = GFC_DECL_BEGIN; d != GFC_DECL_END; d++)
    seen[d] = 0;
(One could introduce another variable for the zero initialization, but the
patch above should be sufficient.)

--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -3282,3 +3282,3 @@ match_attr_spec (void)
   int seen[NUM_DECL];
-  unsigned int d;
+  decl_types d;
   const char *attr;


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-05-29  9:27 ` burnus at gcc dot gnu.org
@ 2012-05-30 16:52 ` burnus at gcc dot gnu.org
  2012-05-30 17:06 ` burnus at gcc dot gnu.org
  2012-06-01  9:57 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-05-30 16:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-30 16:44:49 UTC ---
Author: burnus
Date: Wed May 30 16:44:42 2012
New Revision: 188024

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188024
Log:
2012-05-30  Tobias Burnus  <burnus@net-b.de>

        PR c/53502
        * decl.c (match_attr_spec): Remove "typedef".


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-05-30 16:52 ` burnus at gcc dot gnu.org
@ 2012-05-30 17:06 ` burnus at gcc dot gnu.org
  2012-06-01  9:57 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-05-30 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-30 16:52:17 UTC ---
(In reply to comment #8)
> New Revision: 188024

That patch removed the typedef from gcc/fortran/decl.c. Hence,
--disable-build-poststage1-with-cxx should work now.


Whether GCC should warn for the typedef in C or in C++ mode or in both or in
neither, I leave to the experts.

See comment 6 for observations related to the latter.


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

* [Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx
  2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-05-30 17:06 ` burnus at gcc dot gnu.org
@ 2012-06-01  9:57 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-01  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-01 09:57:18 UTC ---
Fixed.  The warning is IMHO correct as is and we don't currently have a warning
for C++ that would warn if the source isn't also valid C, so FTTB we simply
need to do --disable-build-poststage1-with-cxx from time to time to make sure
it works well (I use it for rpm builds from release branches, but not for the
trunk bootstraps).


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

end of thread, other threads:[~2012-06-01  9:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-27 23:26 [Bug c/53502] New: [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx tkoenig at gcc dot gnu.org
2012-05-27 23:42 ` [Bug c/53502] " tkoenig at gcc dot gnu.org
2012-05-28  2:26 ` pinskia at gcc dot gnu.org
2012-05-28  8:27 ` mikpe at it dot uu.se
2012-05-28 14:57 ` dominiq at lps dot ens.fr
2012-05-28 15:28 ` dominiq at lps dot ens.fr
2012-05-28 15:53 ` jakub at gcc dot gnu.org
2012-05-29  9:27 ` burnus at gcc dot gnu.org
2012-05-30 16:52 ` burnus at gcc dot gnu.org
2012-05-30 17:06 ` burnus at gcc dot gnu.org
2012-06-01  9:57 ` jakub 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).