public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp
@ 2010-12-10 23:45 matt at use dot net
  2010-12-16 14:49 ` [Bug c++/46890] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: matt at use dot net @ 2010-12-10 23:45 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: compile regression from 4.5 when building scummvm's
                    player_v4a.cpp
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: matt@use.net


using 4.6.0 20101206 (experimental) [trunk revision 167481]:

building the open source project, scummvm (http://scummvm.org) trunk revision :
54858
matt@matt-desktop:~/src/scummvm$ CXX=/usr/lib/gcc-snapshot/bin/g++ ./configure
--enable-all-engines
[...]
matt@matt-desktop:~/src/scummvm$ make
[...]
In file included from ./engines/scumm/player_v4a.h:32:0,
                 from engines/scumm/player_v4a.cpp:27:
./sound/mods/tfmx.h:115:2: error: expected ';' after struct definition
./sound/mods/tfmx.h:115:11: error: ISO C++ forbids declaration of '_resource'
with no type [-fpermissive]

[ ... and then several more compile errors that snowball from the first one ...
]

The code in question looks like this:


        struct MdatResource {
                const byte *mdatAlloc;  ///< allocated Block of Memory
                const byte *mdatData;   ///< Start of mdat-File, might point
before mdatAlloc to correct Offset
                uint32 mdatLen;

                uint16 headerFlags;
//              uint32 headerUnknown;
//              char textField[6 * 40];

                struct Subsong {
                        uint16 songstart;       ///< Index in Trackstep-Table
                        uint16 songend;         ///< Last index in
Trackstep-Table
                        uint16 tempo;
                } subsong[kNumSubsongs];

                uint32 trackstepOffset; ///< Offset in mdat
                uint32 sfxTableOffset;

                uint32 patternOffset[kMaxPatternOffsets];       ///< Offset in
mdat
                uint32 macroOffset[kMaxMacroOffsets];   ///< Offset in mdat

                void boundaryCheck(const void *address, size_t accessLen = 1)
const {
                        assert(mdatAlloc <= address && (const byte *)address +
accessLen <= (const byte *)mdatData + mdatLen);
                }
        } const *_resource;


Configuring with g++-4.5 (4.5.1-7ubuntu2) or g++-4.4 (Ubuntu/Linaro
4.4.4-14ubuntu5) fixes the compilation.


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

* [Bug c++/46890] compile regression from 4.5 when building scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
@ 2010-12-16 14:49 ` rguenth at gcc dot gnu.org
  2010-12-17  0:38 ` matt at use dot net
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-16 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2010.12.16 14:49:03
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-16 14:49:03 UTC ---
Please provide preprocessed source.


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

* [Bug c++/46890] compile regression from 4.5 when building scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
  2010-12-16 14:49 ` [Bug c++/46890] " rguenth at gcc dot gnu.org
@ 2010-12-17  0:38 ` matt at use dot net
  2010-12-17  0:39 ` matt at use dot net
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: matt at use dot net @ 2010-12-17  0:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Matt Hargett <matt at use dot net> 2010-12-17 00:38:14 UTC ---
Created attachment 22789
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22789
pre-processed source of the file that triggers the compilation regression

generated with this commandline using scummvm trunk sources:
/usr/lib/gcc-snapshot/bin/g++ -MMD -MF "engines/scumm/.deps/player_v4a.d" -MQ
"engines/scumm/player_v4a.o" -MP -Wall -O3 -flto  -g  -ansi -W
-Wno-unused-parameter -Wno-empty-body -pedantic -Wno-long-long -Wno-multichar
-Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow
-Wimplicit -Wnon-virtual-dtor -Wwrite-strings -fno-rtti -fno-exceptions
-fcheck-new -DSCUMMVM_SVN_REVISION=\"54939\" -DHAVE_CONFIG_H -DUNIX
-DDATA_PATH=\"/usr/local/share/scummvm\"
-DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DSDL_BACKEND
-DENABLE_SCUMM=STATIC_PLUGIN -DENABLE_SCUMM_7_8 -DENABLE_HE
-DENABLE_AGI=STATIC_PLUGIN -DENABLE_AGOS=STATIC_PLUGIN -DENABLE_AGOS2
-DENABLE_CINE=STATIC_PLUGIN -DENABLE_CRUISE=STATIC_PLUGIN
-DENABLE_DRACI=STATIC_PLUGIN -DENABLE_DRASCULA=STATIC_PLUGIN
-DENABLE_GOB=STATIC_PLUGIN -DENABLE_GROOVIE=STATIC_PLUGIN -DENABLE_GROOVIE2
-DENABLE_HUGO=STATIC_PLUGIN -DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LOL
-DENABLE_LASTEXPRESS=STATIC_PLUGIN -DENABLE_LURE=STATIC_PLUGIN
-DENABLE_M4=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN
-DENABLE_MOHAWK=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN
-DENABLE_QUEEN=STATIC_PLUGIN -DENABLE_SAGA=STATIC_PLUGIN -DENABLE_IHNM
-DENABLE_SAGA2 -DENABLE_SCI=STATIC_PLUGIN -DENABLE_SCI32
-DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN
-DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_SWORD25=STATIC_PLUGIN
-DENABLE_TESTBED=STATIC_PLUGIN -DENABLE_TEENAGENT=STATIC_PLUGIN
-DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TOON=STATIC_PLUGIN
-DENABLE_TOUCHE=STATIC_PLUGIN -DENABLE_TUCKER=STATIC_PLUGIN -I. -I. -I./engines
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c engines/scumm/player_v4a.cpp
-E > player_v4a.i


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

* [Bug c++/46890] compile regression from 4.5 when building scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
  2010-12-16 14:49 ` [Bug c++/46890] " rguenth at gcc dot gnu.org
  2010-12-17  0:38 ` matt at use dot net
@ 2010-12-17  0:39 ` matt at use dot net
  2010-12-17  0:41 ` matt at use dot net
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: matt at use dot net @ 2010-12-17  0:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Matt Hargett <matt at use dot net> 2010-12-17 00:39:27 UTC ---
Created attachment 22790
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22790
original source file


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

* [Bug c++/46890] compile regression from 4.5 when building scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (2 preceding siblings ...)
  2010-12-17  0:39 ` matt at use dot net
@ 2010-12-17  0:41 ` matt at use dot net
  2010-12-17  5:55 ` hjl.tools at gmail dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: matt at use dot net @ 2010-12-17  0:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Matt Hargett <matt at use dot net> 2010-12-17 00:40:55 UTC ---
Attached original and pre-processed sources. Re-tested with 4.6.0 20101215,
problem is still happening.


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

* [Bug c++/46890] compile regression from 4.5 when building scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (3 preceding siblings ...)
  2010-12-17  0:41 ` matt at use dot net
@ 2010-12-17  5:55 ` hjl.tools at gmail dot com
  2010-12-17 16:26 ` [Bug c++/46890] [4.6 Regression] Failed to compile " froydnj at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-12-17  5:55 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |froydnj at codesourcery dot
                   |                            |com
   Target Milestone|---                         |4.6.0

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-17 05:55:32 UTC ---
A simple testcase:

[hjl@gnu-35 rrs]$ cat pr46890.cc 
struct MdatResource {
const char *mdatAlloc;
} const *_resource;
[hjl@gnu-35 rrs]$ ./166977/usr/bin/gcc -S pr46890.cc
pr46890.cc:3:1: error: expected \u2018;\u2019 after struct definition
pr46890.cc:3:10: error: ISO C++ forbids declaration of \u2018_resource\u2019
with no type [-fpermissive]
[hjl@gnu-35 rrs]$ 

It is caused by revision 166977:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00866.html


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (4 preceding siblings ...)
  2010-12-17  5:55 ` hjl.tools at gmail dot com
@ 2010-12-17 16:26 ` froydnj at gcc dot gnu.org
  2011-01-03 20:50 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: froydnj at gcc dot gnu.org @ 2010-12-17 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Froyd <froydnj at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |froydnj at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |froydnj at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (5 preceding siblings ...)
  2010-12-17 16:26 ` [Bug c++/46890] [4.6 Regression] Failed to compile " froydnj at gcc dot gnu.org
@ 2011-01-03 20:50 ` rguenth at gcc dot gnu.org
  2011-01-19 13:06 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-03 20:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (6 preceding siblings ...)
  2011-01-03 20:50 ` rguenth at gcc dot gnu.org
@ 2011-01-19 13:06 ` jakub at gcc dot gnu.org
  2011-01-19 20:51 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-19 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-19 12:24:31 UTC ---
Created attachment 23028
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23028
gcc46-pr46890.patch

Untested fix.


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (7 preceding siblings ...)
  2011-01-19 13:06 ` jakub at gcc dot gnu.org
@ 2011-01-19 20:51 ` jakub at gcc dot gnu.org
  2011-01-27 20:24 ` matt at use dot net
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-19 20:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-19 20:40:31 UTC ---
Reassigning back to Nathan, he apparently posted a patch at:
http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01398.html
with feedback at:
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00252.html


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (8 preceding siblings ...)
  2011-01-19 20:51 ` jakub at gcc dot gnu.org
@ 2011-01-27 20:24 ` matt at use dot net
  2011-02-03 17:16 ` froydnj at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: matt at use dot net @ 2011-01-27 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from froydnj at codesourcery dot com <froydnj at codesourcery dot com> 2011-01-26 15:06:09 UTC ---
Waiting on Jason to approve feedback-modified patch:

http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01667.html

--- Comment #9 from Matt Hargett <matt at use dot net> 2011-01-27 20:11:26 UTC ---
Still reproducible with this version:
g++ (Ubuntu/Linaro 20110126-0ubuntu1) 4.6.0 20110126 (experimental) [trunk
revision 169283]


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (9 preceding siblings ...)
  2011-01-27 20:24 ` matt at use dot net
@ 2011-02-03 17:16 ` froydnj at gcc dot gnu.org
  2011-02-03 17:23 ` jakub at gcc dot gnu.org
  2011-04-12 18:16 ` matt at use dot net
  12 siblings, 0 replies; 14+ messages in thread
From: froydnj at gcc dot gnu.org @ 2011-02-03 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Nathan Froyd <froydnj at gcc dot gnu.org> 2011-02-03 17:16:21 UTC ---
Author: froydnj
Date: Thu Feb  3 17:16:17 2011
New Revision: 169797

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169797
Log:
gcc/c-family/
    PR c++/46890
    * c-common.h (keyword_is_decl_specifier): Declare.
    * c-common.c (keyword_is_decl_specifier): Define.
    (keyword_is_function_specifier): New function.

gcc/cp/
    PR c++/46890
    * parser.c (cp_parser_class_specifier): Fix setting of
    want_semicolon.

gcc/testsuite/
    PR c++/46890
    * g++.dg/parser/semicolon3.C: Adjust.
    * g++.dg/parser/semicolon4.C: New testcase.
    * g++.dg/pr46890.C: New testcase.


Added:
    trunk/gcc/testsuite/g++.dg/parse/semicolon4.C
    trunk/gcc/testsuite/g++.dg/pr46890.C
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c-family/c-common.h
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/parse/semicolon3.C


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (10 preceding siblings ...)
  2011-02-03 17:16 ` froydnj at gcc dot gnu.org
@ 2011-02-03 17:23 ` jakub at gcc dot gnu.org
  2011-04-12 18:16 ` matt at use dot net
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-03 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-03 17:23:12 UTC ---
Fixed.


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

* [Bug c++/46890] [4.6 Regression] Failed to compile scummvm's player_v4a.cpp
  2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
                   ` (11 preceding siblings ...)
  2011-02-03 17:23 ` jakub at gcc dot gnu.org
@ 2011-04-12 18:16 ` matt at use dot net
  12 siblings, 0 replies; 14+ messages in thread
From: matt at use dot net @ 2011-04-12 18:16 UTC (permalink / raw)
  To: gcc-bugs

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

Matt Hargett <matt at use dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED

--- Comment #12 from Matt Hargett <matt at use dot net> 2011-04-12 18:15:56 UTC ---
Verified fixed in 4.6.0.


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

end of thread, other threads:[~2011-04-12 18:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 23:45 [Bug c++/46890] New: compile regression from 4.5 when building scummvm's player_v4a.cpp matt at use dot net
2010-12-16 14:49 ` [Bug c++/46890] " rguenth at gcc dot gnu.org
2010-12-17  0:38 ` matt at use dot net
2010-12-17  0:39 ` matt at use dot net
2010-12-17  0:41 ` matt at use dot net
2010-12-17  5:55 ` hjl.tools at gmail dot com
2010-12-17 16:26 ` [Bug c++/46890] [4.6 Regression] Failed to compile " froydnj at gcc dot gnu.org
2011-01-03 20:50 ` rguenth at gcc dot gnu.org
2011-01-19 13:06 ` jakub at gcc dot gnu.org
2011-01-19 20:51 ` jakub at gcc dot gnu.org
2011-01-27 20:24 ` matt at use dot net
2011-02-03 17:16 ` froydnj at gcc dot gnu.org
2011-02-03 17:23 ` jakub at gcc dot gnu.org
2011-04-12 18:16 ` matt at use dot net

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).