public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Different interpretations of #line directive between 3.2 and 2.95.2
@ 2004-12-03  1:33 Jaeyoung Kim
  0 siblings, 0 replies; only message in thread
From: Jaeyoung Kim @ 2004-12-03  1:33 UTC (permalink / raw)
  To: gcc-help

Hi, I found today an interesting difference when
interpreting #line directive between gcc v3.2 and
v2.95.2.

An example code compiled without problems in v2.95.2
has the followings at the beginning of the code;
----
#line 1 "/usr/myhome/src/mysrc.c"

#include "../include/myheader.h"
----
Of course, the header file is located at
/usr/myhome/include directory.

Since the source code has #line directive, the source
code can find the myheader.h even when the
location of the source code is changed in v2.95.2.

However, with v3.2, the compiler produced error
message saying "No such file ../include/myheader.h".

I wonder this is a hidden bug of v3.2 or a changed
feature from v2.95.2. And also I would like to
make v3.2 to be able to find the header file
in the above case. Any comments would be welcomed.
Thanks.

- jay

PS : I know that using the relative path for the
#include directive is not a good way. So, you don't
need to tell me how to bypass this compilation
problem by changing #include directive itself. :)



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-12-03  1:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-03  1:33 Different interpretations of #line directive between 3.2 and 2.95.2 Jaeyoung Kim

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).