delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/18/21:49:26

Message-ID: <006001c06966$09532b00$9b5a149a@mitchllistar.ca>
From: "Kevin Mitchell" <mitchll AT istar DOT ca>
To: <djgpp AT delorie DOT com>
Subject: Re: Stupid DJGPP questions
Date: Mon, 18 Dec 2000 21:22:32 -0500
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

I 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?


and Eli Zaretskii wrote:

>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.

Thanks, Eli, that tells me something important that I suspected but wasn't
sure about... that the docs I should be looking at are the "linker" docs not
the compiler docs. So far, though, I don't mind saying that I haven't found
anything even focusing there... but I can keep plugging away.

>They are not simple.  They are also very easy to answer yourself, by
>writing simple test programs and looking at what they print.


Yes, it *is* very easy to write simple test programs and see what they
print. I didn't even have to do that... as I had, in a previous exercise,
printed out the values of pointers for all the fundamental types. Yes, I did
notice the striking tendency of all pointer addresses of all types to be
divisible by 32. However... that doesn't really answer the question
(B.Stroustrup's question, that is).

I don't think that, just because all the pointers I'm creating are divisible
by 32, that all the pointers in this system *will* be.... After all, I
theorize... maybe it's a limitation of my hardware... or maybe it's just
convenient under the current environment settings... or maybe it's being set
that way because I have all the debugging information turned on... maybe it
will change if I "optimize" the compilation... or remove "debugging"
information... or just run it on a different computer. Who knows?

Actually, I'm hoping that somebody involved in the development of my
compilation/linking/etc tools knows... and has written it down somewhere for
the benefit of those less knowledgeable... Actually, I'm rather shocked that
the answer wasn't really easy to find. I have every intention of posting
code for all the exercises in "The C++ Programming Language" to my web page.
I imagined that this had been done hundreds or thousands of times by other
neophyte programmers... and I expected to see their home pages show up when
I started searching at altavista. What a shock to find out I was wrong!

Besides, if I find the actual documentation (assuming such a thing exists)
maybe I'll find a whole host of restrictions that I haven't even thought
of...

Regards,
Kevin Mitchell

- Raw text -


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