public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: riceman+gcc@mail.rit.edu To: gcc-gnats@gcc.gnu.org Subject: c++/9302: -o and -c preclude use of -include Date: Tue, 14 Jan 2003 08:46:00 -0000 [thread overview] Message-ID: <E18YMfF-0003If-00@scragen> (raw) >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:
next reply other threads:[~2003-01-14 8:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-01-14 8:46 riceman+gcc [this message] 2003-01-28 6:26 Raja R Harinath 2003-03-06 23:10 bkoz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=E18YMfF-0003If-00@scragen \ --to=riceman+gcc@mail.rit.edu \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).