This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

scope of templates (WAS: contributing & bound-checks)


On June 27, 2004 23:56, llewelly@xmission.com wrote:
> It doesn't bounds check pointers or arrays, but you could try
>     configuring with --enable-libstdcxx-debug and compiling with
>     -D_GLIBCXX_DEBUG . This does bounds checking for standard C++
>     library containers;

sorry, wont do.
I need pointer/array checks.
something like CodeGuard (on Borland compiler) or BoundChecker (on MSVC).

I'm getting a weird crash on exit in my game when I compile with gcc (linux 
port) but not with bcc (windows port) so CodeGuard isnt much help in that 
case 

but now I have a bigger problem as Giovanni Bajo nicely pointed to me:

http://gcc.gnu.org/gcc-3.4/changes.html
"In a template definition, unqualified names will no longer find members of a 
dependent base. For example, "

so now I gotta go back thru the >500KB (no kidding) of my template library and 
sprinkle "this->" pretty much everywhere if I want things to compile with gcc 
version >= 3.4.

last time I checked "this->" was implied in member functions.

dunno what's the point of having inheritance and objects in a language if you 
end up doing almost more work than in plain C.

<sarcasm> 
or maybe I'm the only one that thinks its more convenient to access base 
members by default than the global scope even if the standard says otherwise.

of course! what was I thinking.. global scope is where you should put 
everything! why would anyone want to access base class members.
</sarcasm>

it doesnt make much sense to me.

-- 
Stephane Hockenhull
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]