public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9394: c++ -include doesn't work
@ 2003-01-22  0:36 harinath
  0 siblings, 0 replies; only message in thread
From: harinath @ 2003-01-22  0:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9394
>Category:       c++
>Synopsis:       c++ -include doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 22 00:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     harinath@cs.umn.edu
>Release:        gcc version 3.4 20030121 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The following command 

  c++ -o foo.o --include foo.h -c foo.cc

fails with

  c++: cannot specify -o with -c or -S and multiple compilations

It turns out that the c++ driver actually passes

  ... -include xc++-header foo.h ...

to cc1plus.  This is because the 'lang_specific_driver' in gcc/cp/g++spec.c doesn't treat '-include' as a special option requiring an argument.
>How-To-Repeat:

>Fix:
Copy the DEFAULT_WORD_SWITCH_TAKES_ARG from gcc.c into gcc/cp/g++spec.c and use it instead.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

only message in thread, other threads:[~2003-01-22  0:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-22  0:36 c++/9394: c++ -include doesn't work harinath

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