aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-06-17 16:01:28 +0000
committerNick Clifton <nickc@redhat.com>2008-06-17 16:01:28 +0000
commit0146fc9d1ec1b324445da4f89e95184c22308241 (patch)
treed49b42afd921a3ed1e3b5e8d1523e6a26eb2d686 /gas
parente7ddc197153de3bcee60451d867d95a13d5f146f (diff)
downloadgdb-0146fc9d1ec1b324445da4f89e95184c22308241.zip
gdb-0146fc9d1ec1b324445da4f89e95184c22308241.tar.gz
gdb-0146fc9d1ec1b324445da4f89e95184c22308241.tar.bz2
* app.c (do_scrub_chars): Do not UNGET an EOF value.
* ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this macro which does not trigger an array bounds warning in gcc. (PUT_SCNHDR_NLNNO): Likewise. (GET_SCNHDR_FLAGS): Likewise. (PUT_SCNHDR_FLAGS): Likewise. (GET_SCNHDR_PAGE): Likewise. (PUT_SCNHDR_PAGE): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/app.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 160d5d0..21c5eb9 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2008-06-17 Nick Clifton <nickc@redhat.com>
+
+ * app.c (do_scrub_chars): Do not UNGET an EOF value.
+
2008-06-16 Hans-Peter Nilsson <hp@bitrange.com>
PR gas/6607
diff --git a/gas/app.c b/gas/app.c
index 4ba9edc..8884d9b 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -676,7 +676,7 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
if (ch == '\'')
/* Change to avoid warning about unclosed string. */
PUT ('`');
- else
+ else if (ch != EOF)
UNGET (ch);
break;
#endif
@@ -1097,7 +1097,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
ch2 = GET ();
if (ch2 != '-')
{
- UNGET (ch2);
+ if (ch2 != EOF)
+ UNGET (ch2);
goto de_fault;
}
/* Read and skip to end of line. */
@@ -1283,7 +1284,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
state = 9;
if (!IS_SYMBOL_COMPONENT (ch))
{
- UNGET (ch);
+ if (ch != EOF)
+ UNGET (ch);
break;
}
}
@@ -1407,4 +1409,3 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
return to - tostart;
}
-