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