This is the mail archive of the
mailing list for the GCC project.
Re: type checking for typedefs in g++
- From: dewar at gnat dot com (Robert Dewar)
- To: gcc at gcc dot gnu dot org, gregor at zeitlinger dot de
- Date: Wed, 14 Aug 2002 09:11:45 -0400 (EDT)
- Subject: Re: type checking for typedefs in g++
>>Is there a way to use strict type checking (like in Ada) for g++?
This is a meaningless question. Both Ada and C++ are strongly typed
languages. The type models are different, for example there is no way
in C++ to distinguish between integer types, and no general derived
type model, but that's just a difference between the languages.
Some people would describe this as saying that Ada has stronger typing
than C++ and argue that this is an advantage. No doubt someone could
argue on the other side (though it's a bit of a stretch :-)
In any case, the idea of being able to use the Ada typing model in C++
makes zero sense. So, back to your question. If by "strict typing", you
mean that c++ should obey the strict typing rules in the C++ standard,
then it does (if you know a counterexample, submit it as a bug report).
If you mean by "strict typing" that you want g++ to use the Ada type model,
then the answer is certainly no! If you want the Ada type model, use Ada :-)