[CrystalSpace] #969: Patch to make CS-2.0 build with gcc-4.7+ (no -fpermissive)
"CrystalSpace" <[email protected]> Mon, 30 Jul 2012 09:49:42 -0000
| Newsgroups | gmane.comp.graphics.crystalspace.tracker |
|---|---|
| Message-ID | <[email protected]> |
#969: Patch to make CS-2.0 build with gcc-4.7+ (no -fpermissive)
------------------------+---------------------------------------------------
Reporter: yamakuzure | Owner: jorrit
Type: defect | Status: new
Priority: major | Milestone:
Component: general | Version: V1.4
Keywords: |
------------------------+---------------------------------------------------
Hi all,
currently it is not possible to compile CrystalSpace 2.0 with gcc-4.7.1
without the use of the "-fpermissive" switch. Here is the snippet from the
gcc manual:
{{{
-fpermissive
Downgrade some diagnostics about nonconformant code from errors
to warnings. Thus, using -fpermissive allows some nonconforming
code to compile.
}}}
The attached archive consists of 5 patches that clarify some calls to
methods gcc-4.7.1 could not find by argument-dependent lookup. This means,
that the compiler isn't sure about which exact method is meant.
The log suggest a possible method (which is used if the -fpermissive
switch is used), but please revise all substitutions, maybe they are
wrong.
If any of those substitutions is wrong, this would mean that compiling
with the -fpermissive switch would result in broken code -- maybe
impossible to debug.
Here is a snippet from the logs, so you know what I did:
{{{
C++ ./out/linux/optimize/libs/csutil/evoutlet.o
In file included from libs/csutil/reftrack.h:26:0,
from libs/csutil/reftrack.cpp:26:
./include/csutil/blockallocator.h: In instantiation of
'csBlockAllocator<T, Allocator, ObjectDispose,
SizeComputer>::~csBlockAllocator()
[with T = csRefTracker::RefInfo;
Allocator = CS::Memory::AllocatorMalloc;
ObjectDispose = csBlockAllocatorDisposeDelete<csRefTracker::RefInfo>;
SizeComputer = csBlockAllocatorSizeObject<csRefTracker::RefInfo>]':
libs/csutil/reftrack.cpp:31:48: required from here
./include/csutil/blockallocator.h:196:5: warning: 'DisposeAll' was
not declared in this scope, and no declarations were found by
argument-dependent lookup at the point of instantiation [-fpermissive]
./include/csutil/blockallocator.h:196:5: note: declarations in dependent
base
'csFixedSizeAllocator<40ul, CS::Memory::AllocatorMalloc>'
are not found by unqualified lookup
./include/csutil/blockallocator.h:196:5: note: use 'this->DisposeAll'
instead
}}}
--
Ticket URL: <http://www.crystalspace3d.org/trac/CS/ticket/969>
CrystalSpace <http://www.crystalspace3d.org/>
Free open-source 3D SDK.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/