This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Preprocessing oddity breaks binutils
- To: schwab at issan dot cs dot uni-dortmund dot de
- Subject: Re: Preprocessing oddity breaks binutils
- From: mark at codesourcery dot com
- Date: Fri, 04 Jun 1999 07:22:44 -0700
- Cc: zack at rabi dot columbia dot edu, brolley at cygnus dot com, egcs-bugs at egcs dot cygnus dot com, binutils at sourceware dot cygnus dot com
- Organization: CodeSourcery, LLC
- References: <199906021849.OAA24100@blastula.phys.columbia.edu><vyzhfoopdwc.fsf@issan.cs.uni-dortmund.de>
>>>>> "Andreas" == Andreas Schwab <schwab@issan.cs.uni-dortmund.de> writes:
Andreas> Thus the current behaviour of cpp is more in the spirit
Andreas> of the standard, and IMHO cpplib is wrong.
I disagree, but clearly the standard does not really specify behavior
here.
My original example indicates how hard it is to forsee what might
happen, given the current behavior. In particular, in a package that
has srcdir/objdir builds, if you have built once in the srcdir (or if
the package distributes generated files in the srcdir), and you then
build in an objdir, all yacc-generated files get the wrong header.
What you have yacc to to work around this problem? Generate #line's
that refer to the objdir, rather than the srcdir? But, that's not
where the source actually *is*, so then debugging wouldn't work. I
suppose you could insert a #line for the objdir right before
#include'ing the header, but why should you have to?
There's really no way to resolve this debate, so I don't intend to
argue the point any further. I'm happy to leave it in Dave and
Zack's capable hands!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com