Package: nestopia
Version: 1.47-1
Severity: important
User: [email protected]
Usertags: ftbfs-gcc-6 gcc-6-enumerator-value
This package fails to build with GCC 6. GCC 6 has not been released
yet, but it's expected that GCC 6 will become the default compiler for
stretch.
Note that only the first error is reported; there might be more. You
can find a snapshot of GCC 6 in experimental. To build with GCC 6,
you can set CC=gcc-6 CXX=g++-6 explicitly.
> sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
> make[2]: Entering directory '/<<PKGBUILDDIR>>'
> g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DNST_PRAGMA_ONCE -g -O2
> -fstack-protector-strong -Wformat -Werror=format-security -c
> source/core/NstApu.cpp -o objs/core/NstApu.o
> source/core/NstApu.cpp: In member function 'void
> Nes::Core::Apu::SaveState(Nes::Core::State::Saver&, Nes::dword) const':
> source/core/NstApu.cpp:492:6: warning: narrowing conversion of
> '(Nes::uint)((const Nes::Core::Apu*)this)->Nes::Core::Apu::ctrl' from
> 'Nes::uint {aka unsigned int}' to 'Nes::byte {aka unsigned char}' inside { }
> [-Wnarrowing]
> ctrl,
> ^~~~
>
> source/core/NstApu.cpp:493:12: warning: narrowing conversion of '(clock &
> 255u)' from 'Nes::Core::Cycle {aka unsigned int}' to 'Nes::byte {aka unsigned
> char}' inside { } [-Wnarrowing]
> clock & 0xFF,
> ~~~~~~^~~~~~
>
> source/core/NstApu.cpp:494:12: warning: narrowing conversion of '(clock >>
> 8)' from 'Nes::Core::Cycle {aka unsigned int}' to 'Nes::byte {aka unsigned
> char}' inside { } [-Wnarrowing]
> clock >> 8,
> ~~~~~~^~~~
>
> source/core/NstApu.cpp:495:13: warning: narrowing conversion of
> '(Nes::word)((const
> Nes::Core::Apu*)this)->Nes::Core::Apu::cycles.Nes::Core::Apu::Cycles::frameDivider'
> from 'Nes::word {aka short unsigned int}' to 'Nes::byte {aka unsigned char}'
> inside { } [-Wnarrowing]
> cycles.frameDivider
> ~~~~~~~^~~~~~~~~~~~
>
> source/core/NstApu.cpp:516:12: warning: narrowing conversion of '(clock &
> 255u)' from 'Nes::Core::Cycle {aka unsigned int}' to 'Nes::byte {aka unsigned
> char}' inside { } [-Wnarrowing]
> clock & 0xFF,
> ~~~~~~^~~~~~
>
> source/core/NstApu.cpp:517:12: warning: narrowing conversion of '(clock >>
> 8)' from 'Nes::Core::Cycle {aka unsigned int}' to 'Nes::byte {aka unsigned
> char}' inside { } [-Wnarrowing]
> clock >> 8,
> ~~~~~~^~~~
>
> source/core/NstApu.cpp:518:28: warning: narrowing conversion of
> '(int)(((short unsigned int)((const
> Nes::Core::Apu*)this)->Nes::Core::Apu::cycles.Nes::Core::Apu::Cycles::frameIrqRepeat)
> % 3u)' from 'int' to 'Nes::byte {aka unsigned char}' inside { } [-Wnarrowing]
> cycles.frameIrqRepeat % 3
> ~~~~~~~~~~~~~~~~~~~~~~^~~
>
> source/core/NstApu.cpp: In member function 'void
> Nes::Core::Apu::Channel::Envelope::SaveState(Nes::Core::State::Saver&,
> Nes::dword) const':
> source/core/NstApu.cpp:1070:13: warning: narrowing conversion of '(((unsigned
> int)((int)((const
> Nes::Core::Apu::Channel::Envelope*)this)->Nes::Core::Apu::Channel::Envelope::regs[0]))
> | (((bool)((const
> Nes::Core::Apu::Channel::Envelope*)this)->Nes::Core::Apu::Channel::Envelope::reset)
> ? 128u : 0u))' from 'unsigned int' to 'Nes::byte {aka unsigned char}' inside
> { } [-Wnarrowing]
> regs[0] | (reset ? 0x80U : 0x00U),
> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
>
> source/core/NstApu.cpp: In member function 'void
> Nes::Core::Apu::Triangle::SaveState(Nes::Core::State::Saver&, Nes::dword)
> const':
> source/core/NstApu.cpp:1609:17: warning: narrowing conversion of '(unsigned
> int)(((short unsigned int)((const
> Nes::Core::Apu::Triangle*)this)->Nes::Core::Apu::Triangle::waveLength) &
> 255u)' from 'unsigned int' to 'Nes::byte {aka unsigned char}' inside { }
> [-Wnarrowing]
> waveLength & 0xFFU,
> ~~~~~~~~~~~^~~~~~~
>
> source/core/NstApu.cpp:1610:17: warning: narrowing conversion of
> '(((int)((const
> Nes::Core::Apu::Triangle*)this)->Nes::Core::Apu::Triangle::waveLength) >> 8)'
> from 'int' to 'Nes::byte {aka unsigned char}' inside { } [-Wnarrowing]
> waveLength >> 8,
> ~~~~~~~~~~~^~~~
>
> source/core/NstApu.cpp:1611:20: warning: narrowing conversion of
> '(((Nes::uint)((int)((const
> Nes::Core::Apu::Triangle*)this)->Nes::Core::Apu::Triangle::linearCounter)) |
> (((Nes::uint)((Nes::Core::Apu::Triangle::Status)((const
> Nes::Core::Apu::Triangle*)this)->Nes::Core::Apu::Triangle::status)) << 7))'
> from 'Nes::uint {aka unsigned int}' to 'Nes::byte {aka unsigned char}' inside
> { } [-Wnarrowing]
> linearCounter | (uint(status) << 7),
> ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
>
> source/core/NstApu.cpp: In member function 'void
> Nes::Core::Apu::Dmc::SaveState(Nes::Core::State::Saver&, Nes::dword, const
> Nes::Core::Cpu&, Nes::Core::Cycle) const':
> source/core/NstApu.cpp:2020:14: warning: narrowing conversion of '(dmcClock &
> 255u)' from 'Nes::dword {aka unsigned int}' to 'Nes::byte {aka unsigned
> char}' inside { } [-Wnarrowing]
> dmcClock & 0xFF,
> ~~~~~~~~~^~~~~~
>
> source/core/NstApu.cpp:2021:14: warning: narrowing conversion of '(dmcClock
> >> 8)' from 'Nes::dword {aka unsigned int}' to 'Nes::byte {aka unsigned
> char}' inside { } [-Wnarrowing]
> dmcClock >> 8,
> ~~~~~~~~~^~~~
>
> source/core/NstApu.cpp:2025:55: warning: narrowing conversion of
> '((((((Nes::uint)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::regs.Nes::Core::Apu::Dmc::<anonymous
> struct>::ctrl) & 15u) | (((((Nes::uint)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::regs.Nes::Core::Apu::Dmc::<anonymous
> struct>::ctrl) & 64u) != 0u) ? 16u : 0u)) | (((((Nes::uint)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::regs.Nes::Core::Apu::Dmc::<anonymous
> struct>::ctrl) & 128u) != 0u) ? 32u : 0u)) | ((((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::dma.Nes::Core::Apu::Dmc::<anonymous
> struct>::lengthCounter) != 0) ? 64u : 0u))' from 'Nes::uint {aka unsigned
> int}' to 'Nes::byte {aka unsigned char}' inside { } [-Wnarrowing]
> (
> ~~
> ( ( regs.ctrl & REG0_FREQUENCY ) ) |
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ( ( regs.ctrl & REG0_LOOP ) ? 0x10U : 0U ) |
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ( ( regs.ctrl & REG0_IRQ_ENABLE ) ? 0x20U : 0U ) |
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
> ( ( dma.lengthCounter ) ? 0x40U : 0U )
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ),
> ~
>
> source/core/NstApu.cpp:2028:30: warning: narrowing conversion of
> '((((unsigned int)((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::regs.Nes::Core::Apu::Dmc::<anonymous
> struct>::address)) - 49152u) >> 6)' from 'unsigned int' to 'Nes::byte {aka
> unsigned char}' inside { } [-Wnarrowing]
> (regs.address - 0xC000U) >> 6,
> ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
>
> source/core/NstApu.cpp:2029:31: warning: narrowing conversion of
> '((((unsigned int)((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::regs.Nes::Core::Apu::Dmc::<anonymous
> struct>::lengthCounter)) - 1u) >> 4)' from 'unsigned int' to 'Nes::byte {aka
> unsigned char}' inside { } [-Wnarrowing]
> (regs.lengthCounter - 1U) >> 4,
> ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
>
> source/core/NstApu.cpp:2030:23: warning: narrowing conversion of '(((unsigned
> int)(((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::dma.Nes::Core::Apu::Dmc::<anonymous
> struct>::address) >> 0)) & 255u)' from 'unsigned int' to 'Nes::byte {aka
> unsigned char}' inside { } [-Wnarrowing]
> (dma.address >> 0 & 0xFFU),
> ~~~~~~~~~~~~~~~~~~^~~~~~~~
>
> source/core/NstApu.cpp:2031:32: warning: narrowing conversion of
> '((((unsigned int)(((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::dma.Nes::Core::Apu::Dmc::<anonymous
> struct>::address) >> 8)) & 127u) | ((unsigned int)((((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::dma.Nes::Core::Apu::Dmc::<anonymous
> struct>::buffered) != 0) ? 128 : 0)))' from 'unsigned int' to 'Nes::byte
> {aka unsigned char}' inside { } [-Wnarrowing]
> (dma.address >> 8 & 0x7FU) | (dma.buffered ? 0x80 : 0x00),
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> source/core/NstApu.cpp:2032:23: warning: narrowing conversion of
> '((((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::dma.Nes::Core::Apu::Dmc::<anonymous
> struct>::lengthCounter) != 0) ? ((((unsigned int)((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::dma.Nes::Core::Apu::Dmc::<anonymous
> struct>::lengthCounter)) - 1u) >> 4) : 0u)' from 'unsigned int' to
> 'Nes::byte {aka unsigned char}' inside { } [-Wnarrowing]
> dma.lengthCounter ? (dma.lengthCounter - 1U) >> 4 : 0,
> ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> source/core/NstApu.cpp:2033:9: warning: narrowing conversion of
> '(Nes::word)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::dma.Nes::Core::Apu::Dmc::<anonymous
> struct>::buffer' from 'Nes::word {aka short unsigned int}' to 'Nes::byte
> {aka unsigned char}' inside { } [-Wnarrowing]
> dma.buffer,
> ~~~~^~~~~~
>
> source/core/NstApu.cpp:2034:7: warning: narrowing conversion of '(7 -
> ((int)((const
> Nes::Core::Apu::Dmc*)this)->Nes::Core::Apu::Dmc::out.Nes::Core::Apu::Dmc::<anonymous
> struct>::shifter))' from 'int' to 'Nes::byte {aka unsigned char}' inside { }
> [-Wnarrowing]
> 7 - out.shifter,
> ~~^~~~~~~~~~~~~
>
> In file included from source/core/NstAssert.hpp:29:0,
> from source/core/NstCpu.hpp:28,
> from source/core/NstApu.cpp:26:
> source/core/NstCore.hpp: In instantiation of 'long int
> Nes::Core::signed_shl(T, Nes::uint) [with T = int; Nes::uint = unsigned int]':
> source/core/NstApu.cpp:1150:32: required from here
> source/core/NstCore.hpp:282:25: error: left operand of shift expression '(-7
> << 1)' is negative [-fpermissive]
> enum {NATIVE = T(-7) << 1 == -14};
> ~~~~~~^~~~
>
> source/core/NstCore.hpp:282:9: error: enumerator value for 'NATIVE' is not an
> integer constant
> enum {NATIVE = T(-7) << 1 == -14};
> ^
>
> Makefile:377: recipe for target 'objs/core/NstApu.o' failed
--
Martin Michlmayr
Linux for HPE Helion, Hewlett Packard Enterprise