Reserved names in C++ [Was: Re: mingw __dllexport__]
Mon, 18 Nov 2002 06:34:05 +1000
Roberto Bagnara <firstname.lastname@example.org> writes:
> I don't know if strict conformance to standards is one of GMP's goals.
> If it is, it would be better to avoid using names that are reserved
> to the language's implementation.
The rule we're working to is that _foo belongs to the compiler and
libc, and __foo is for third party libraries, or something like that.
For practical purposes annexing __gmp* at the symbol level and gmp*
and some mp* in gmp.h shouldn't be in too much danger of clashing with
I guess in the libgmpxx routines we've ended up with __mpz_struct
getting into the mangling, where __gmpz_struct might have been better.
Alas doing anything about that would break binary compatibility.