Mail Archives: djgpp/2000/12/18/05:45:19
On Sun, 17 Dec 2000, Kevin Mitchell wrote:
> What is the longest local name you can use in a C++ program on your system?
> What is the longest external name you can use in a C++ program on your
> system?
This is not a limitation of the compiler, it is usually the limtation
of the linker and the debug format supported by your development
environment. Since GCC supports many different back ends, linkers,
and debug formats, it's unreasonable to expect the GCC docs to have
the information you are looking for.
> Are there any restrictions on the characters you can use in a name?
The restrictions are those imposed by the C++ standard, plus the
dollar sign is allowed as an extension.
> What, on your system, are the restrictions on the pointer types char*,
> int*, and void*?
They are all 32-bit values. An int is aligned on a 4-byte boundary,
for efficiency, but the underlying x86 architecture doesn't require
that.
> I can't *believe* the degree of difficulty I've been having answering these
> really simple questions.
They are not simple. They are also very easy to answer yourself, by
writing simple test programs and looking at what they print.
- Raw text -