www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/07/11:07:15

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Wed, 7 Feb 2001 15:54:34 +0100 (MET)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: trouble with MSDOS Macro
In-Reply-To: <Pine.SUN.3.91.1010207082225.2148I-100000@is>
Message-ID: <Pine.LNX.4.10.10102071544370.4137-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 7 Feb 2001, Eli Zaretskii wrote:

> 
> On Tue, 6 Feb 2001, Silver wrote:
> 
> > Well OK. But it isn't documented. I just searched for "MSDOS" and I
> > could find anything about this macro. So if this is all intended the way
> > it is by DJ Delorie then it should be documented.
> 
> Can anyone suggest where to document this?
> 
> IMHO, this belongs to the GCC manual (but someone from this list
> should submit the changes to GCC maintainers), since MSDOS is defined
> in `specs'.

But we wrote those specs, not the GCC guys. So it seems to be in our
ballpark. AFAICS, there is no place in the GCC manual where this type of
information could be stored.

But a look into the CPP manual did turn up something (after all, these
are preprocessor macros, so that's conceivably the point where they
should be documented):

--- snip ---
   The C preprocessor normally has several predefined macros that vary
between machines because their purpose is to indicate what type of
system and machine is in use.  This manual, being for all systems and
machines, cannot tell you exactly what their names are; instead, we
offer a list of some typical ones.  You can use `cpp -dM' to see the
values of predefined macros; see *Note Invocation::.
--- end ----

I.e. in a slight extension of this, 'gcc -E -dM hello.c' should give us
this list. Let's see. On this somewhat antique Linux box:

acp3bf-broeker ~> gcc -E -dM -x c /dev/null
#define __linux__ 1 
#define linux 1 
#define __i386__ 1 
#define __i386 1 
#define __GNUC_MINOR__ 7 
#define __i486__ 1 
#define i386 1 
#define __unix 1 
#define __unix__ 1 
#define __GNUC__ 2 
#define __linux 1 
#define __ELF__ 1 
#define unix 1 

Looks quite exactly like the missing documentation, to me :-) And given
the fact that there's no way to stop users from changing the 'specs'
without updating gcc.txi or cpp.txi accordingly, I actually tend to think
that this is the right way of doing this: let the actual configuration
display itself, rather than trying to keep the GCC manual up to date with
external sources of information it cannot control.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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