OSDN Git Service

* godump.c (go_define): Don't accept a string immediately after
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 May 2011 21:07:15 +0000 (21:07 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 May 2011 21:07:15 +0000 (21:07 +0000)
another operand.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174141 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/godump.c

index 7264b15..9a5a496 100644 (file)
@@ -1,5 +1,10 @@
 2011-05-24  Ian Lance Taylor  <iant@google.com>
 
+       * godump.c (go_define): Don't accept a string immediately after
+       another operand.
+
+2011-05-24  Ian Lance Taylor  <iant@google.com>
+
        * godump.c (struct godump_container): Add invalid_hash field.
        (go_format_type): Return false if type is found in invalid_hash.
        (go_output_typedef): Add invalid type to invalid_hash.
index 4009899..35db1d6 100644 (file)
@@ -300,7 +300,11 @@ go_define (unsigned int lineno, const char *buffer)
        case '"':
        case '\'':
          {
-           char quote = *p;
+           char quote;
+
+           if (saw_operand)
+             goto unknown;
+           quote = *p;
            *q++ = *p++;
            while (*p != quote)
              {