yann@56: [removed first hunk so it would apply to 2.16.1 - copyright date already updated - dank] yann@56: yann@56: Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html yann@56: Fixes yann@56: localealias.s:544: Error: junk at end of line, first unrecognized character is `,' yann@56: when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3 yann@56: yann@56: Paths adjusted to match crosstool's patcher. yann@56: yann@56: Message-Id: m3n052qw2g.fsf@whitebox.m5r.de yann@56: From: Andreas Schwab yann@56: To: Nathan Sidwell yann@56: Cc: Ian Lance Taylor , binutils at sources dot redhat dot com yann@56: Date: Fri, 23 Apr 2004 22:27:19 +0200 yann@56: Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line yann@56: yann@56: Nathan Sidwell writes: yann@56: yann@56: > Index: read.c yann@56: > =================================================================== yann@56: > RCS file: /cvs/src/src/gas/read.c,v yann@56: > retrieving revision 1.76 yann@56: > diff -c -3 -p -r1.76 read.c yann@56: > *** read.c 12 Mar 2004 17:48:12 -0000 1.76 yann@56: > --- read.c 18 Mar 2004 09:56:05 -0000 yann@56: > *************** read_a_source_file (char *name) yann@56: > *** 1053,1059 **** yann@56: > #endif yann@56: > input_line_pointer--; yann@56: > /* Report unknown char as ignored. */ yann@56: > ! ignore_rest_of_line (); yann@56: > } yann@56: > yann@56: > #ifdef md_after_pass_hook yann@56: > --- 1053,1059 ---- yann@56: > #endif yann@56: > input_line_pointer--; yann@56: > /* Report unknown char as ignored. */ yann@56: > ! demand_empty_rest_of_line (); yann@56: > } yann@56: > yann@56: > #ifdef md_after_pass_hook yann@56: yann@56: This means that the unknown character is no longer ignored, despite the yann@56: comment. As a side effect a line starting with a line comment character yann@56: not followed by APP in NO_APP mode now triggers an error instead of just a yann@56: warning, breaking builds of glibc on m68k-linux. Earlier in yann@56: read_a_source_file where #APP is handled there is another comment that yann@56: claims that unknown comments are ignored, when in fact they aren't (only yann@56: the initial line comment character is skipped). yann@56: yann@56: Note that the presence of #APP will mess up the line counters, but yann@56: that appears to be difficult to fix. yann@56: yann@56: Andreas. yann@56: yann@56: 2004-04-23 Andreas Schwab yann@56: yann@56: * read.c (read_a_source_file): Ignore unknown text after line yann@56: comment character. Fix misleading comment. yann@56: yann@56: --- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200 yann@56: +++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200 yann@56: @@ -1008,10 +1008,14 @@ read_a_source_file (char *name) yann@56: unsigned int new_length; yann@56: char *tmp_buf = 0; yann@56: yann@56: - bump_line_counters (); yann@56: s = input_line_pointer; yann@56: if (strncmp (s, "APP\n", 4)) yann@56: - continue; /* We ignore it */ yann@56: + { yann@56: + /* We ignore it */ yann@56: + ignore_rest_of_line (); yann@56: + continue; yann@56: + } yann@56: + bump_line_counters (); yann@56: s += 4; yann@56: yann@56: sb_new (&sbuf); yann@56: @@ -1110,7 +1110,7 @@ read_a_source_file (char *name) yann@56: continue; yann@56: #endif yann@56: input_line_pointer--; yann@56: - /* Report unknown char as ignored. */ yann@56: + /* Report unknown char as error. */ yann@56: demand_empty_rest_of_line (); yann@56: } yann@56: yann@56: yann@56: -- yann@56: Andreas Schwab, SuSE Labs, schwab@suse.de yann@56: SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany yann@56: Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 yann@56: "And now for something completely different."