public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
To: Zack Weinberg <zack@rabi.columbia.edu>
Cc: Dave Brolley <brolley@cygnus.com>,
	Mark Mitchell <mark@codesourcery.com>,
	egcs-bugs@egcs.cygnus.com, binutils@sourceware.cygnus.com
Subject: Re: Preprocessing oddity breaks binutils
Date: Thu, 01 Jul 1999 00:00:00 -0000	[thread overview]
Message-ID: <vyzhfoopdwc.fsf@issan.cs.uni-dortmund.de> (raw)
In-Reply-To: <199906021849.OAA24100@blastula.phys.columbia.edu>

Zack Weinberg <zack@rabi.columbia.edu> writes:

|> On Wed, 02 Jun 1999 12:04:06 -0400, Dave Brolley wrote:
|> >I agree that this is probably a long standing quirk bug in the
|> >preprocessor which is arguably a bug. Does anyone know of any source which
|> >relies on the current behaviour?
|> 
|> FYI, cpplib uses the test.h in the subdirectory.  I agree with Mark that
|> this is the right thing - #line should not affect the search path.

But #line changes the file name.

The standard says that the place where to search is implementation
defined.  The cpp manual says: "It searches for a file named FILE first in
the current directory, [...].  The current directory is the directory of
the current input file."

About the #line directive the standard says:

       [#4] A preprocessing directive of the form

         # line digit-sequence "s-char-sequence-opt" new-line

       sets the presumed line  number  similarly  and  changes  the
       presumed  name  of the source file to be the contents of the
       character string literal.

Thus the current behaviour of cpp is more in the spirit of the standard,
and IMHO cpplib is wrong.

Andreas.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org

  reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Mark Mitchell
1999-07-01  0:00 ` Dave Brolley
1999-07-01  0:00   ` Zack Weinberg
1999-07-01  0:00     ` Andreas Schwab [this message]
1999-07-01  0:00       ` mark
1999-07-01  0:00         ` Andreas Schwab
1999-07-01  0:00           ` mark
1999-07-01  0:00             ` Andreas Schwab
1999-07-01  0:00 ` Ian Lance Taylor
1999-07-01  0:00   ` Mark Mitchell

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=vyzhfoopdwc.fsf@issan.cs.uni-dortmund.de \
    --to=schwab@issan.cs.uni-dortmund.de \
    --cc=binutils@sourceware.cygnus.com \
    --cc=brolley@cygnus.com \
    --cc=egcs-bugs@egcs.cygnus.com \
    --cc=mark@codesourcery.com \
    --cc=zack@rabi.columbia.edu \
    /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).