* [gentoo-user] gcc: error: 'nothrow' was not declared in this scope
@ 2009-03-07 15:26 Michael Sullivan
2009-03-08 15:27 ` Arttu V.
2009-03-08 16:50 ` [gentoo-user] " Nikos Chantziaras
0 siblings, 2 replies; 5+ messages in thread
From: Michael Sullivan @ 2009-03-07 15:26 UTC (permalink / raw
To: gentoo-user
I've wrote a program, and when I compile it gcc balks:
michael@camille OurRPG $ make
g++ -O2 -W -Wall -pedantic `sdl-config --cflags` -c draw.cpp
enemyparty.o allyparty.o
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory: In function
'std::pair<_Tp*, int> std::__get_temporary_buffer(ptrdiff_t, _Tp*)':
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:83: error:
'nothrow' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory: In function
'void std::return_temporary_buffer(_Tp*)':
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:123: error:
'nothrow' was not declared in this scope
party.h: At global scope:
party.h:7: warning: 'class Party' has virtual functions but non-virtual
destructor
allyparty.h:9: warning: 'class AllyParty' has virtual functions but
non-virtual destructor
enemyparty.h:8: warning: 'class EnemyParty' has virtual functions but
non-virtual destructor
draw.cpp: In member function 'void Draw::Init()':
draw.cpp:36: warning: missing initializer for member 'SDL_Color::unused'
draw.cpp:37: warning: missing initializer for member 'SDL_Color::unused'
draw.cpp: At global scope:
draw.cpp:84: warning: unused parameter 'state'
make: *** [draw.o] Error 1
Should I report this as a bug, or is there a way I can fix it? I'm
using:
camille local # emerge -pv gcc
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-devel/gcc-4.1.2 USE="doc fortran gtk mudflap nls
vanilla (-altivec) -bootstrap -build -d -gcj (-hardened) -ip28 -ip32r10k
-libffi (-multilib) -multislot (-n32) (-n64) -nocxx -objc -objc++
-objc-gc -test" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] gcc: error: 'nothrow' was not declared in this scope
2009-03-07 15:26 [gentoo-user] gcc: error: 'nothrow' was not declared in this scope Michael Sullivan
@ 2009-03-08 15:27 ` Arttu V.
2009-03-08 15:48 ` Michael Sullivan
2009-03-08 16:50 ` [gentoo-user] " Nikos Chantziaras
1 sibling, 1 reply; 5+ messages in thread
From: Arttu V. @ 2009-03-08 15:27 UTC (permalink / raw
To: gentoo-user
On 3/7/09, Michael Sullivan <msulli1355@gmail.com> wrote:
> michael@camille OurRPG $ make
> g++ -O2 -W -Wall -pedantic `sdl-config --cflags` -c draw.cpp
> enemyparty.o allyparty.o
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory: In function
> 'std::pair<_Tp*, int> std::__get_temporary_buffer(ptrdiff_t, _Tp*)':
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:83: error:
> 'nothrow' was not declared in this scope
Have you tried to help the compiler find nothrow declaration by
explicitly doing:
#include <new>
(Disclaimer: I'm no c++ guru, just googled for that.)
--
Arttu V.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] gcc: error: 'nothrow' was not declared in this scope
2009-03-08 15:27 ` Arttu V.
@ 2009-03-08 15:48 ` Michael Sullivan
2009-03-08 16:56 ` Arttu V.
0 siblings, 1 reply; 5+ messages in thread
From: Michael Sullivan @ 2009-03-08 15:48 UTC (permalink / raw
To: gentoo-user
On Sun, 2009-03-08 at 17:27 +0200, Arttu V. wrote:
> On 3/7/09, Michael Sullivan <msulli1355@gmail.com> wrote:
> > michael@camille OurRPG $ make
> > g++ -O2 -W -Wall -pedantic `sdl-config --cflags` -c draw.cpp
> > enemyparty.o allyparty.o
> > /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory: In function
> > 'std::pair<_Tp*, int> std::__get_temporary_buffer(ptrdiff_t, _Tp*)':
> > /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:83: error:
> > 'nothrow' was not declared in this scope
>
> Have you tried to help the compiler find nothrow declaration by
> explicitly doing:
>
> #include <new>
>
> (Disclaimer: I'm no c++ guru, just googled for that.)
>
I put it in there, but it didn't help. Thanks for trying.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-user] Re: gcc: error: 'nothrow' was not declared in this scope
2009-03-07 15:26 [gentoo-user] gcc: error: 'nothrow' was not declared in this scope Michael Sullivan
2009-03-08 15:27 ` Arttu V.
@ 2009-03-08 16:50 ` Nikos Chantziaras
1 sibling, 0 replies; 5+ messages in thread
From: Nikos Chantziaras @ 2009-03-08 16:50 UTC (permalink / raw
To: gentoo-user
Michael Sullivan wrote:
> I've wrote a program, and when I compile it gcc balks:
>
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:83: error:
> 'nothrow' was not declared in this scope
#include <memory>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] gcc: error: 'nothrow' was not declared in this scope
2009-03-08 15:48 ` Michael Sullivan
@ 2009-03-08 16:56 ` Arttu V.
0 siblings, 0 replies; 5+ messages in thread
From: Arttu V. @ 2009-03-08 16:56 UTC (permalink / raw
To: gentoo-user
On 3/8/09, Michael Sullivan <msulli1355@gmail.com> wrote:
> On Sun, 2009-03-08 at 17:27 +0200, Arttu V. wrote:
>> On 3/7/09, Michael Sullivan <msulli1355@gmail.com> wrote:
>> > michael@camille OurRPG $ make
>> > g++ -O2 -W -Wall -pedantic `sdl-config --cflags` -c draw.cpp
>> > enemyparty.o allyparty.o
>> > /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory: In function
>> > 'std::pair<_Tp*, int> std::__get_temporary_buffer(ptrdiff_t, _Tp*)':
>> > /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:83: error:
>> > 'nothrow' was not declared in this scope
>>
>> Have you tried to help the compiler find nothrow declaration by
>> explicitly doing:
>>
>> #include <new>
>>
>> (Disclaimer: I'm no c++ guru, just googled for that.)
>>
> I put it in there, but it didn't help. Thanks for trying.
Another thing might be to try the -E option for gcc, and check the
results to see if it actually correctly includes everything necessary
when preprocessing. After that, I'm out of ideas, it could be your
code or it could be the compiler.
--
Arttu V.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-08 16:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-07 15:26 [gentoo-user] gcc: error: 'nothrow' was not declared in this scope Michael Sullivan
2009-03-08 15:27 ` Arttu V.
2009-03-08 15:48 ` Michael Sullivan
2009-03-08 16:56 ` Arttu V.
2009-03-08 16:50 ` [gentoo-user] " Nikos Chantziaras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox