public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@cambridge.arm.com>
To: Neil Booth <neil@daikokuya.co.uk>
Cc: Fergus Henderson <fjh@cs.mu.OZ.AU>, Mike Laman <mlaman@cox.net>,
	GCC <gcc@gcc.gnu.org>,
	Richard.Earnshaw@arm.com
Subject: Re: __main
Date: Wed, 04 Sep 2002 04:03:00 -0000	[thread overview]
Message-ID: <200209041101.g84B1eL17964@pc960.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Tue, 03 Sep 2002 22:21:06 BST." <20020903212105.GB31696@daikokuya.co.uk>

> Fergus Henderson wrote:-
> 
> > On 02-Sep-2002, Mike Laman <mlaman@cox.net> wrote:
> > > I'm creating the port (working on my third month on this project).
> > 
> > In that case, why don't you define NAME__MAIN and SYMBOL__MAIN
> > in your target header files?
> > 
> > ("set NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
> > give the same symbol without quotes for an alternative entry point.
> > You must define both, or neither.")
> 
> Why not just define one in terms of the other?  I could never
> figure that out.

Oh probably because when I added that 10+ years ago there was some reason 
why we couldn't rely on being able to generate a string from a symbol; 
that is, why one of

#define STRINGIFY(X) #X

and

#define STRINGIFY(X) "X"

was failing, though you don't really expect me to remember that now do you?

R.

PS I've always condidered the K+R form a truly gross hack; there certainly 
was nothing in K+R1 that suggested this had to work.

  reply	other threads:[~2002-09-04 11:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29 11:25 __main Robert Spanton
2002-08-29 11:40 ` __main Fergus Henderson
2002-08-29 22:18   ` __main Mike Laman
2002-09-01  9:04     ` __main Fergus Henderson
2002-09-01 13:14       ` __main Mike Laman
2002-09-01 13:22         ` __main Mike Laman
2002-09-01 13:40           ` __main Robert Spanton
2002-09-02  4:26             ` __main Lars Brinkhoff
2002-09-02  5:29           ` __main Ian Dall
2002-09-02 19:08             ` __main Mike Laman
2002-09-01 22:56         ` __main Fergus Henderson
2002-09-02  3:36           ` __main Mike Laman
2002-09-02  5:51             ` __main Fergus Henderson
2002-09-02 19:06               ` __main Mike Laman
2002-09-03 14:03                 ` __main Fergus Henderson
2002-09-03 14:21                   ` __main Neil Booth
2002-09-04  4:03                     ` Richard Earnshaw [this message]
2002-09-02 19:37     ` __main Zack Weinberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200209041101.g84B1eL17964@pc960.cambridge.arm.com \
    --to=rearnsha@cambridge.arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=fjh@cs.mu.OZ.AU \
    --cc=gcc@gcc.gnu.org \
    --cc=mlaman@cox.net \
    --cc=neil@daikokuya.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).