public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9302: -o and -c preclude use of -include
@ 2003-03-06 23:10 bkoz
  0 siblings, 0 replies; 3+ messages in thread
From: bkoz @ 2003-03-06 23:10 UTC (permalink / raw)
  To: bkoz, gcc-bugs, gcc-prs, geoffk, nobody, riceman+gcc

Synopsis: -o and -c preclude use of -include

Responsible-Changed-From-To: unassigned->geoffk
Responsible-Changed-By: bkoz
Responsible-Changed-When: Thu Mar  6 23:10:35 2003
Responsible-Changed-Why:
    
    Perhaps you could look at this?
    
    g++ (GCC) 3.2.2 
    <bkoz@belmont> /home/bkoz/work/9302
    %g++ -c abc.cc -include abc.h
    <bkoz@belmont> /home/bkoz/work/9302
    %g++ -c abc.cc -o fukd -include abc.h
    
    
    g++ (GCC) 3.4 20030306 (experimental)
    %$bld/H-x86-gcc/bin/g++ -c abc.cc  -include abc.h
    <command line>:140237139:55712: -xc++-header: No such file or directory
    <command line>:139316359:52432: -xc++-header: No such file or directory
    
    <bkoz@belmont> /home/bkoz/work/9302
    %$bld/H-x86-gcc/bin/g++ -c abc.cc -o fukd -include abc.h
    g++: cannot specify -o with -c or -S and multiple compilations
    
    I think there is another one too, c++/9394, with a patch.
    
    -benjamin

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


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

* Re: c++/9302: -o and -c preclude use of -include
@ 2003-01-28  6:26 Raja R Harinath
  0 siblings, 0 replies; 3+ messages in thread
From: Raja R Harinath @ 2003-01-28  6:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9302; it has been noted by GNATS.

From: Raja R Harinath <harinath@acm.org>
To: riceman+gcc@mail.rit.edu,  gcc-gnats@gcc.gnu.org, 
 gcc-bugs@gcc.gnu.org,  nobody@gcc.gnu.org,  gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: c++/9302: -o and -c preclude use of -include
Date: Tue, 28 Jan 2003 00:19:34 -0600

 I think a better explanation and suggested approach is present in PR
 c++/9394.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9302
 
 


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

* c++/9302: -o and -c preclude use of -include
@ 2003-01-14  8:46 riceman+gcc
  0 siblings, 0 replies; 3+ messages in thread
From: riceman+gcc @ 2003-01-14  8:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9302
>Category:       c++
>Synopsis:       -o and -c preclude use of -include
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 14 00:46:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tim
>Release:        3.4 20030113 (experimental)
>Organization:
RIT
>Environment:
System: Linux scragen 2.4.20 #9 Sun Jan 5 12:41:42 EST 2003 i686 unknown unknown GNU/Linux
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/home/riceman --program-suffix=-cust
>Description:
When using -o in conjunction with -c, it is no longer possible to use 
-include.

I would guess it's related to precompiled headers (PCH for 
keyword-searchers), but I'll leave it to someone more experienced to 
decide that and mark the description as appropriate.

Projects like mozilla, which compiled without error in 3.2, will fail to 
compile without (at least Makefile) modification on 3.4 as a result of 
this bug.

	
>How-To-Repeat:

$ cat abc.cpp
int main() {
  return 0;
}

$ cat abc.h
#define ABC 0

$ g++ --version
2.95.4

$ g++-3.2 --version
g++-3.2 (GCC) 3.2.2 20030109 (Debian prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

$ g++ -o abc.o -c abc.cpp -include abc.h
$ rm abc.o
$ g++-3.2 -o abc.o -c abc.cpp -include abc.h
$ rm abc.o
$ g++-cust -o abc.o -c abc.cpp -include abc.h
g++-cust: cannot specify -o with -c or -S and multiple compilations

Note that g++ is debian package g++ version 2.95.4-17 (mentioned for 
completeness).
g++-cust, as shown in the fields, is compiled from CVS and installed 
into my home directory.

Though seemingly particularly useless, the preprocessor output is as 
follows:

$ g++ -o - -E abc.cpp
# 1 "abc.cpp"
int main() {
  return 0;
}

$ g++-cust -o - -E  abc.cpp
# 1 "abc.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "abc.cpp"
int main() {
  return 0;
}

Output similar to the last example can be seen from g++-3.2.

(above can be seen 'built-in' and 'command-line' within angle brackets, 
which will probably be filtered out by the submission process).

	
>Fix:
Workaround: migrate the -include to a #include within the file to avoid 
the error.
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-06 23:10 c++/9302: -o and -c preclude use of -include bkoz
  -- strict thread matches above, loose matches on Subject: below --
2003-01-28  6:26 Raja R Harinath
2003-01-14  8:46 riceman+gcc

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