public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Neil Booth <neil@daikokuya.demon.co.uk>
To: Nick Kurshev <nickols_k@mail.ru>
Cc: gcc@gcc.gnu.org
Subject: Re: Strange gcc-3.0.1 preprocessor
Date: Sun, 14 Oct 2001 10:59:00 -0000	[thread overview]
Message-ID: <20011014185934.B16205@daikokuya.demon.co.uk> (raw)
In-Reply-To: <20011014214752.32b3e72f.nickols_k@mail.ru>

Nick Kurshev wrote:-

> It was only way to build such trick. Else how you will notice
> compiler to build preprocessor string without space characters?

Like I told you.

> Well, the same code with space characters around __MACHINE__:
> source:
>     #define _INLINES <biewlib/sysdep/ __MACHINE__ /_inlines.h>
>     #define __CONFIG <biewlib/sysdep/ __MACHINE__ /__config.h>
>     #include __CONFIG
>     #include _INLINES

Why have you added spaces?  Of course it will now break:

> output:
> biewlib/sysdep/_sys_dep.h:30:22: biewlib/sysdep/ ia32 /__config.h: No such file or directory
> biewlib/sysdep/_sys_dep.h:31:22: biewlib/sysdep/ ia32 /_inlines.h: No such file or directory

The following works for me:

#define STDIO stdio
#define STDIO_H </usr/include/STDIO.h>
#include STDIO_H

Note that the preprocessor does not do string literal concatenation in
header names.

Neil.

  reply	other threads:[~2001-10-14 10:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-14  7:46 Nick Kurshev
2001-10-14  8:12 ` Neil Booth
2001-10-14 10:45   ` Nick Kurshev
2001-10-14 10:59     ` Neil Booth [this message]
2001-10-14 11:06       ` Nick Kurshev
2001-10-14 11:09         ` Neil Booth
2001-10-15 10:59           ` Nick Kurshev

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=20011014185934.B16205@daikokuya.demon.co.uk \
    --to=neil@daikokuya.demon.co.uk \
    --cc=gcc@gcc.gnu.org \
    --cc=nickols_k@mail.ru \
    /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).