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

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