public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/17110] New: #include_next fails following #include that specifies an absolute path
@ 2004-08-19 20:00 wb at fnal dot gov
2004-08-19 20:04 ` [Bug preprocessor/17110] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: wb at fnal dot gov @ 2004-08-19 20:00 UTC (permalink / raw)
To: gcc-bugs
This bug first manifested for us using gcc 3.4.1 on each of multiple platforms;
it appears to be a regression from each previous gcc 3.x we have tried.
Specifically: an incorrect diagnostic ("no include path in which to search for
...") is produced under the following circumstances:
File_A contains #include "/absolute/path/to/File_B"
and
File_B contains #include_next "File_C"
Note that this failure only arises when an absolute path is specified in
Fila_A's #include.
The failure manifests when compiling via gcc as well as via g++.
The failure seems not to depend on the form of the command line -I; it does not
matter whether the directory there specified is part of a relative path or is
part of an absolute path.
A test case follows; there are 5 tiny files to be spread across 3 directories.
Because there is an absolute path involved, you will need to edit one line (in
test/test.cc) to reflect your local directory tree.
Thanks for looking into this; it's a real show-stopper for us in moving to gcc
3.4.1. Best,
-- WEB
========== test/compile ==========
#!/bin/sh
go() {
rm -f a.out
( gcc test.cc -o a.out -Inext -D$1\
&& ./a.out\
&& echo Success\
)\
|| echo Failure!;
}
echo "V1: #include \"inc/next.cc\""
go V1
echo "V2: #include \"./inc/next.cc\""
go V2
echo "V3: #include \"/complete/path/to/inc/next.cc\""
go V3
========== test/test.cc ==========
#if defined V1 // works
#include "inc/next.cc"
#elif defined V2 // works
#include "./inc/next.cc"
#else // EDIT THE NEXT LINE PER YOUR SETUP; FAILS!
#include "/complete/path/to/test/inc/next.cc"
#endif
========== test/inc/next.h ==========
// Note: this header ought be located in the same directory as the
// next.cc test program; if the directive functions properly, this
// header will not be #include'd
#error "got wrong <incnext.hh>"
========== test/inc/next.cc ==========\
#define RESULT 1
#include_next "next.h"
int main()
{
return RESULT;
}
========== test/next/next.h ==========
// If the directive functions properly, this header
// will be located instead of the one (by the same name) in the same
// directory as the next.cc test program
#ifdef RESULT
#undef RESULT
#endif
#define RESULT 0
--
Summary: #include_next fails following #include that specifies an
absolute path
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P1
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wb at fnal dot gov
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17110
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/17110] #include_next fails following #include that specifies an absolute path
2004-08-19 20:00 [Bug preprocessor/17110] New: #include_next fails following #include that specifies an absolute path wb at fnal dot gov
@ 2004-08-19 20:04 ` pinskia at gcc dot gnu dot org
2004-08-20 15:40 ` [Bug preprocessor/17110] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-19 20:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-19 20:04 -------
http://gcc.gnu.org/ml/gcc/2003-03/msg00120.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17110
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/17110] [3.4/3.5 Regression] #include_next fails following #include that specifies an absolute path
2004-08-19 20:00 [Bug preprocessor/17110] New: #include_next fails following #include that specifies an absolute path wb at fnal dot gov
2004-08-19 20:04 ` [Bug preprocessor/17110] " pinskia at gcc dot gnu dot org
@ 2004-08-20 15:40 ` pinskia at gcc dot gnu dot org
2004-08-29 18:50 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-20 15:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-20 15:40 -------
Confirmed but I could not tell from the link I gave in the previous comment if this was expected or not.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-08-20 15:40:08
date| |
Summary|#include_next fails |[3.4/3.5 Regression]
|following #include that |#include_next fails
|specifies an absolute path |following #include that
| |specifies an absolute path
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17110
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/17110] [3.4/3.5 Regression] #include_next fails following #include that specifies an absolute path
2004-08-19 20:00 [Bug preprocessor/17110] New: #include_next fails following #include that specifies an absolute path wb at fnal dot gov
2004-08-19 20:04 ` [Bug preprocessor/17110] " pinskia at gcc dot gnu dot org
2004-08-20 15:40 ` [Bug preprocessor/17110] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-08-29 18:50 ` mmitchel at gcc dot gnu dot org
2004-11-01 0:47 ` [Bug preprocessor/17110] [3.4/4.0 " mmitchel at gcc dot gnu dot org
2005-01-12 17:58 ` [Bug preprocessor/17110] " ebotcazou at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-29 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-29 18:50 -------
Postponed until GCC 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.2 |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17110
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/17110] [3.4/4.0 Regression] #include_next fails following #include that specifies an absolute path
2004-08-19 20:00 [Bug preprocessor/17110] New: #include_next fails following #include that specifies an absolute path wb at fnal dot gov
` (2 preceding siblings ...)
2004-08-29 18:50 ` mmitchel at gcc dot gnu dot org
@ 2004-11-01 0:47 ` mmitchel at gcc dot gnu dot org
2005-01-12 17:58 ` [Bug preprocessor/17110] " ebotcazou at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01 0:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-11-01 00:46 -------
Postponed until GCC 3.4.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.3 |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17110
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/17110] #include_next fails following #include that specifies an absolute path
2004-08-19 20:00 [Bug preprocessor/17110] New: #include_next fails following #include that specifies an absolute path wb at fnal dot gov
` (3 preceding siblings ...)
2004-11-01 0:47 ` [Bug preprocessor/17110] [3.4/4.0 " mmitchel at gcc dot gnu dot org
@ 2005-01-12 17:58 ` ebotcazou at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-12 17:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-01-12 17:58 -------
AFAICS this has never worked as you intended: GCC 2.95.3, 2.96, 3.0.4, 3.1.1,
3.2.3 and 3.3.5 issue
#error "got wrong <inc/next.h>"
which means that #include_next was behaving like #include in that case. So the
error is a progress, as Geoff and Neil said in the thread linked to above.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
Status|NEW |RESOLVED
Priority|P1 |P2
Resolution| |INVALID
Summary|[3.4/4.0 Regression] |#include_next fails
|#include_next fails |following #include that
|following #include that |specifies an absolute path
|specifies an absolute path |
Target Milestone|3.4.4 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17110
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-01-12 17:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-19 20:00 [Bug preprocessor/17110] New: #include_next fails following #include that specifies an absolute path wb at fnal dot gov
2004-08-19 20:04 ` [Bug preprocessor/17110] " pinskia at gcc dot gnu dot org
2004-08-20 15:40 ` [Bug preprocessor/17110] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-08-29 18:50 ` mmitchel at gcc dot gnu dot org
2004-11-01 0:47 ` [Bug preprocessor/17110] [3.4/4.0 " mmitchel at gcc dot gnu dot org
2005-01-12 17:58 ` [Bug preprocessor/17110] " ebotcazou at gcc dot gnu dot org
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).