]> git.saurik.com Git - bison.git/blobdiff - tests/cxx-type.at
(struct yyltype): Define members even when not
[bison.git] / tests / cxx-type.at
index 4e8762f276660474c2e4f14d9dfc15e7e7b39dae..df85fd7e9ebe099dec8a2fcf3b42ef336a32e190 100644 (file)
@@ -1,5 +1,5 @@
 # Checking GLR Parsing.                         -*- Autotest -*-
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -93,8 +93,9 @@ declarator : ID               { printf ("\"%s\" ", ]$[1); }
 int
 main (int argc, char** argv)
 {
-  assert (argc = 2);
-  assert (freopen (argv[1], "r", stdin));
+  assert (argc == 2);
+  if (!freopen (argv[1], "r", stdin))
+    abort ();
   exit (yyparse ());
 }
 
@@ -128,7 +129,7 @@ yylex ()
        ungetc (c, stdin);
        scanf ("%[A-Za-z0-9_]", buffer);
        yylval = strdup (buffer);
-       return isupper (buffer[0]) ? TYPENAME : ID;
+       return isupper ((unsigned char) buffer[0]) ? TYPENAME : ID;
       }
       return c;
     }
@@ -182,7 +183,7 @@ z + q;
 This is total garbage, but it should be ignored.
 ]])
 
-AT_CHECK([bison types.y -o types.c], 0, [], ignore)
+AT_CHECK([bison -o types.c types.y], 0, [], ignore)
 AT_COMPILE([types])
 ])