This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Tiny fix of LINK_COMMAND_SPEC
- From: James E Wilson <wilson at specifix dot com>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Aug 2005 18:27:00 -0700
- Subject: Re: [patch] Tiny fix of LINK_COMMAND_SPEC
- References: <email@example.com>
Kaz Kojima wrote:
* gcc.c (LINK_COMMAND_SPEC): Add space after %(link_ssp).
I ran into this problem myself while trying to write docs for the
The relevant clue is in gcc.c handle_brace_body, the first comment,
/* Locate the closing } or ;, honoring nested braces.
Trim trailing whitespace. */
So white space before a trailing } is always ignored. The code
implementing this is a few lines down where end_body is decremented.
So I think we need to changes to properly fix this:
1) The useless space at the end of LINK_SPP_SPEC should be deleted.
2) The missing space in LINK_COMMAND_SPEC should be added.
You have the second one, but not the first. This is patch is OK if you
add the missing part.
Jakub expressed concerns about adding unnecessary spaces if
LINK_SPP_SPEC expands to nothing, but that isn't a problem. We already
collapse multiple white space chars. Just look at the @c spec in gcc.c
for instance, which has lots of tabs and spaces which are harmless.
Jim Wilson, GNU Tools Support, http://www.specifix.com