delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/18/05:45:19

Date: Mon, 18 Dec 2000 09:52:59 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Kevin Mitchell <mitchll AT istar DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Stupid DJGPP questions
In-Reply-To: <000201c06898$cc564f20$735c149a@mitchllistar.ca>
Message-ID: <Pine.SUN.3.91.1001218095241.15310N@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019