Gcc3 Bugs
by Entr0py · in Torque Game Engine Advanced · 12/03/2006 (3:07 am) · 1 replies
I am compiling with GCC3 (mingw), so some things may not compile for me that would otherwise. I will use this thread to keep track of bugs that I find.
In gBitmap.cpp at line 684:
In gBitmap.cpp at line 684:
Point2F max(F32(getWidth()-1), F32(getHeight()-1));should be:
Point2F max((F32(getWidth())-1), (F32(getHeight())-1));
Torque 3D Owner Entr0py
--> Compiling atlas/core/atlasClassFactory.cpp In file included from atlas/resource/atlasResourceGeomTOC.h:8, from atlas/core/atlasClassFactory.cpp:7: atlas/core/atlasResourceTOC.h:26: declaration of 'typedef ChunkType AtlasResourceStub<ChunkType>::ChunkType' atlas/core/atlasResourceTOC.h:22: shadows template parm 'class ChunkType' atlas/core/atlasResourceTOC.h:26: declaration of 'typedef ChunkType AtlasResourceStub<ChunkType>::ChunkType' atlas/core/atlasResourceTOC.h:22: changes meaning of 'ChunkType' from 'class ChunkType' atlas/core/atlasResourceTOC.h:149: declaration of 'typedef StubType AtlasResourceTOC<StubType>::StubType' atlas/core/atlasResourceTOC.h:122: shadows template parm 'class StubType' atlas/core/atlasResourceTOC.h:149: declaration of 'typedef StubType AtlasResourceTOC<StubType>::StubType' atlas/core/atlasResourceTOC.h:122: changes meaning of 'StubType' from 'class StubType'The problem is here:
template<class ChunkType> class AtlasResourceStub : public AtlasBaseStub { public: typedef ChunkType ChunkType;and here:
template<class StubType> class AtlasResourceTOC : public AtlasBaseTOC<StubType> { ... public: typedef StubType StubType;This works in VC++, but it shouldn't. I find it to be a bit odd and according to the C++ standard:(4.14) "A template parameter shall not be redeclared within its scope (including nested scopes)."