public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/35458] New: Dependency generation (-M) does not quote '#' in filenames
@ 2008-03-04 13:36 markus dot milleder at generali dot at
2008-03-04 13:38 ` [Bug preprocessor/35458] " markus dot milleder at generali dot at
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: markus dot milleder at generali dot at @ 2008-03-04 13:36 UTC (permalink / raw)
To: gcc-bugs
Dependency generation (-M) does not quote '#' in filenames.
--
Summary: Dependency generation (-M) does not quote '#' in
filenames
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: markus dot milleder at generali dot at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35458
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/35458] Dependency generation (-M) does not quote '#' in filenames
2008-03-04 13:36 [Bug preprocessor/35458] New: Dependency generation (-M) does not quote '#' in filenames markus dot milleder at generali dot at
@ 2008-03-04 13:38 ` markus dot milleder at generali dot at
2008-03-04 13:54 ` rwild at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: markus dot milleder at generali dot at @ 2008-03-04 13:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from markus dot milleder at generali dot at 2008-03-04 13:37 -------
Created an attachment (id=15259)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15259&action=view)
Patch for mkdeps.c + testcase
This trivial patch cures the problem. I do not have a copyright assignment, but
the patch should be small and simple enough.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35458
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/35458] Dependency generation (-M) does not quote '#' in filenames
2008-03-04 13:36 [Bug preprocessor/35458] New: Dependency generation (-M) does not quote '#' in filenames markus dot milleder at generali dot at
2008-03-04 13:38 ` [Bug preprocessor/35458] " markus dot milleder at generali dot at
@ 2008-03-04 13:54 ` rwild at gcc dot gnu dot org
2008-03-04 14:10 ` markus dot milleder at generali dot at
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rwild at gcc dot gnu dot org @ 2008-03-04 13:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rwild at gcc dot gnu dot org 2008-03-04 13:53 -------
Please note that quoting # in makefiles is not portable, but only supported
by some make implementations. For example, with
foo: a\#b
bar: c#d
AIX make will assume 'foo' depends on 'a\', and 'bar' on 'c'.
Likewise HP-UX make. Consequently, both of these make's will error out on
either line of:
a#b:
a\#b:
--
rwild at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Ralf dot Wildenhues at gmx
| |dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35458
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/35458] Dependency generation (-M) does not quote '#' in filenames
2008-03-04 13:36 [Bug preprocessor/35458] New: Dependency generation (-M) does not quote '#' in filenames markus dot milleder at generali dot at
2008-03-04 13:38 ` [Bug preprocessor/35458] " markus dot milleder at generali dot at
2008-03-04 13:54 ` rwild at gcc dot gnu dot org
@ 2008-03-04 14:10 ` markus dot milleder at generali dot at
2008-03-06 18:10 ` tromey at gcc dot gnu dot org
2008-03-06 18:16 ` tromey at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: markus dot milleder at generali dot at @ 2008-03-04 14:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from markus dot milleder at generali dot at 2008-03-04 14:10 -------
(In reply to comment #2)
> Please note that quoting # in makefiles is not portable, but only supported
> by some make implementations. For example, with
> foo: a\#b
> bar: c#d
>
> AIX make will assume 'foo' depends on 'a\', and 'bar' on 'c'.
> Likewise HP-UX make. Consequently, both of these make's will error out on
> either line of:
> a#b:
> a\#b:
>
So it seems to me the patch is an improvement for make versions that understand
quoting and does not worsen the situation for those that do not, i.e. files
containing # are broken on e.g. AIX without the patch and with it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35458
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/35458] Dependency generation (-M) does not quote '#' in filenames
2008-03-04 13:36 [Bug preprocessor/35458] New: Dependency generation (-M) does not quote '#' in filenames markus dot milleder at generali dot at
` (2 preceding siblings ...)
2008-03-04 14:10 ` markus dot milleder at generali dot at
@ 2008-03-06 18:10 ` tromey at gcc dot gnu dot org
2008-03-06 18:16 ` tromey at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-03-06 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tromey at gcc dot gnu dot org 2008-03-06 18:09 -------
Subject: Bug 35458
Author: tromey
Date: Thu Mar 6 18:08:40 2008
New Revision: 132982
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132982
Log:
libcpp
2008-03-06 Markus Milleder <markus.milleder@generali.at>
PR preprocessor/35458
* mkdeps.c (munge): Quote '#' with a '\'.
gcc/testsuite
2008-03-06 Markus Milleder <markus.milleder@generali.at>
PR preprocessor/35458
* gcc.dg/cpp/cmdlne-M-2.c: New file.
* gcc.dg/cpp/cmdlne-M-2#.h: New file.
* gcc.dg/cpp/#cmdlne-M-2.h: New file.
Added:
trunk/gcc/testsuite/gcc.dg/cpp/#cmdlne-M-2.h
trunk/gcc/testsuite/gcc.dg/cpp/cmdlne-M-2#.h
trunk/gcc/testsuite/gcc.dg/cpp/cmdlne-M-2.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libcpp/ChangeLog
trunk/libcpp/mkdeps.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35458
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/35458] Dependency generation (-M) does not quote '#' in filenames
2008-03-04 13:36 [Bug preprocessor/35458] New: Dependency generation (-M) does not quote '#' in filenames markus dot milleder at generali dot at
` (3 preceding siblings ...)
2008-03-06 18:10 ` tromey at gcc dot gnu dot org
@ 2008-03-06 18:16 ` tromey at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-03-06 18:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from tromey at gcc dot gnu dot org 2008-03-06 18:15 -------
I agree with comment #3.
This is an improvement.
Users concerned with real portability should be avoiding "#" anyhow.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35458
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-06 18:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-04 13:36 [Bug preprocessor/35458] New: Dependency generation (-M) does not quote '#' in filenames markus dot milleder at generali dot at
2008-03-04 13:38 ` [Bug preprocessor/35458] " markus dot milleder at generali dot at
2008-03-04 13:54 ` rwild at gcc dot gnu dot org
2008-03-04 14:10 ` markus dot milleder at generali dot at
2008-03-06 18:10 ` tromey at gcc dot gnu dot org
2008-03-06 18:16 ` tromey 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).