public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/12478] New: -NT / -NQ don't behave as documented.
@ 2003-10-01 17:23 taylor at candd dot org
2003-10-01 17:39 ` [Bug driver/12478] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: taylor at candd dot org @ 2003-10-01 17:23 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12478
Summary: -NT / -NQ don't behave as documented.
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: taylor at candd dot org
CC: gcc-bugs at gcc dot gnu dot org
In gcc/doc/cppopts.texi, in the description of -MT it says:
Change the target of the rule emitted by dependency generation. By
default CPP takes the name of the main input file, including any path,
deletes any file suffix such as @samp{.c}, and appends the platform's
usual object suffix. The result is the target.
An @option{-MT} option will set the target to be exactly the string you
specify. If you want multiple targets, you can specify them as a single
argument to @option{-MT}, or use multiple @option{-MT} options.
My reading of this is that if you specify -MT <target>, then the
default target will *NOT* be used.
And examining the code, that appears to be the intent -- for each
target specified with -MT / -MQ, deps_add_target is called. And after
processing such arguments, deps_add_default_target is called (by
cpp_read_main_file) which only adds the default target if there are no
targets already specified.
But, that isn't the full story. In gcc.c, variable
cpp_unique_options, we find this line:
%{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}
which causes the default target to get added unilaterally.
I believe that either this line should disappear totally or it should
be changed to:
%{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}}
i.e., have !MT && !MQ added as a condition.
I have lightly tested both solutions; they both appear to work.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug driver/12478] -NT / -NQ don't behave as documented.
2003-10-01 17:23 [Bug driver/12478] New: -NT / -NQ don't behave as documented taylor at candd dot org
@ 2003-10-01 17:39 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-01 17:39 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12478
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-01 17:39 -------
This is a dup of bug 12448.
*** This bug has been marked as a duplicate of 12448 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-01 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01 17:23 [Bug driver/12478] New: -NT / -NQ don't behave as documented taylor at candd dot org
2003-10-01 17:39 ` [Bug driver/12478] " pinskia 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).