public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* preprocessor/10014: Problems with "#include  __BASE_FILE__" in different dirrectories
@ 2003-03-10 10:56 ilgis
  0 siblings, 0 replies; 2+ messages in thread
From: ilgis @ 2003-03-10 10:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: info


>Number:         10014
>Category:       preprocessor
>Synopsis:       Problems with "#include  __BASE_FILE__" in different dirrectories
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 10 10:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     ilgis@num.uni-sb.de
>Release:        gcc-2.95.3, gcc-3.0, gcc-3.2
>Organization:
>Environment:
Linux Red Hat 7.1 and Linux Suse 8.0
>Description:
Let's create a simple "test.c" file with only one line:
/******************* begin test.c ********************/
#include "in.h"
/******************* end test.c **********************/
and create this header file "in.h" as following:
/******************* begin in.h **********************/
#ifndef     SWSIZE
  #define   SWSIZE 1
  #include  __BASE_FILE__
  #undef    SWSIZE
  #define   SWSIZE 2
#endif

#if ( SWSIZE == 1 )
// some special definitions
#else
// some special definitions
#endif
/********************** end in.h ********************/

if both files are in the same dirrectory then we can
succesfully compile it with the following command:
cc -c test.c
but if "in.h" is, for example, in INCLUDE dirrectory, then
cc -c -IINCLUDE test.c
produces the following message:
In file included from test.c:1:
INCLUDE/in.h:3: test.c: No such file or directory

It is possible to solve it by dirrective like:
cc -c -IINCLUDE $(PWD)/test.c
but it seems a little bit strange!
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: preprocessor/10014: Problems with "#include  __BASE_FILE__" in different dirrectories
@ 2003-03-10 11:04 neil
  0 siblings, 0 replies; 2+ messages in thread
From: neil @ 2003-03-10 11:04 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, ilgis, info, nobody

Synopsis: Problems with "#include  __BASE_FILE__" in different dirrectories

State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Mon Mar 10 11:04:31 2003
State-Changed-Why:
    That's the way include path searching works (see manual).  If you get rid of __BASE_FILE__ the error will still occur I imagine.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10014


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-10 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-10 10:56 preprocessor/10014: Problems with "#include __BASE_FILE__" in different dirrectories ilgis
2003-03-10 11:04 neil

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