lose implicit int
authorJason Merrill <jason@gcc.gnu.org>
Thu, 13 Nov 1997 09:36:16 +0000 (04:36 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 13 Nov 1997 09:36:16 +0000 (04:36 -0500)
From-SVN: r16449

13 files changed:
gcc/testsuite/g++.old-deja/g++.brendan/crash49.C
gcc/testsuite/g++.old-deja/g++.bugs/900519_08.C [deleted file]
gcc/testsuite/g++.old-deja/g++.jason/crash2.C
gcc/testsuite/g++.old-deja/g++.jason/opover.C
gcc/testsuite/g++.old-deja/g++.jason/static1.C
gcc/testsuite/g++.old-deja/g++.law/visibility13.C
gcc/testsuite/g++.old-deja/g++.mike/misc13.C
gcc/testsuite/g++.old-deja/g++.mike/misc14.C
gcc/testsuite/g++.old-deja/g++.mike/net10.C
gcc/testsuite/g++.old-deja/g++.mike/net9.C
gcc/testsuite/g++.old-deja/g++.mike/p1567.C
gcc/testsuite/g++.old-deja/g++.mike/p1862.C
gcc/testsuite/g++.old-deja/g++.mike/p1989.C

index 5a8e11f4a42ca64712ddd973afcfc54fbae7bb62..98a580d3cb1fb380f79fe27dfd13cdd817eb9ae4 100644 (file)
@@ -2,8 +2,8 @@
 // GROUPS passed old-abort
 #include<iostream.h>
 
-const /* int */ keys = 10;
-const /* int */ key[keys] = {6, key[1], 2, keys, 1, 7, 6, key[2], key[8]};
+const int keys = 10;
+const int key[keys] = {6, key[1], 2, keys, 1, 7, 6, key[2], key[8]};
 
 void main()
 { // ERROR - return type for main
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_08.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_08.C
deleted file mode 100644 (file)
index ed99ae6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// g++ 1.37.1 bug 900519_08
-
-// g++ fails to accept the following legal syntax for an invocation of the
-// new operator, in which the type specifier is implicitly "int".
-
-// cfront 2.0 passes this test.
-
-// keywords: syntax, operator new, type specifier, type qualifier
-
-void test ()
-{
-   new const /* int */ (1);                            // gets bogus error
-}
-
-int main () { return 0; }
index 9e96af1e3c3dcf5a838ad17331445713e93aadcc..c16abb8b5d06563573c365733d71f9158e3506ab 100644 (file)
@@ -3,7 +3,7 @@
 // Build don't link:
 
 class PhysicalPageId {
-  const maximum_block_numbers = 2;
+  const int maximum_block_numbers = 2;
   long block_number[maximum_block_numbers];
 };
 
index 1fa90b68f2533e3216d34638136a0d68c25ebe58..f4a3213f0d3f6f6b904f31a361c095e78b3939bd 100644 (file)
@@ -7,7 +7,7 @@ struct A {
 };
 
 struct B {
-  friend operator== (B, int);
+  friend int operator== (B, int);
 };
 
 int foo (A& a) {
index fd0a937b6ebcf8c74f75116d647785038a409b95..994da851039e07fbcafc03267a98a40fbc95d26d 100644 (file)
@@ -1,6 +1,6 @@
 // PRMS id: 6863
 
-extern "C" printf(const char *, ...);
+extern "C" int printf(const char *, ...);
 extern "C" void abort();
 
 enum ENUM {E1=0, E2 };
index f1f4684553f7f9fdd5a239f7c419b3d6f324178f..6e53fc739c5b37331a359cc1f0454d47b0a0d73a 100644 (file)
@@ -37,7 +37,7 @@ ostream& operator<<( ostream& os, Array<Type>& ar )
 template <class Type>
 void Array<Type>::print(ostream& os)
 {
-    const lineLength = 12;
+    const int lineLength = 12;
 
     os << "( " << size << " )< ";
     for (int ix = 0; ix < size; ++ix) {
index 299af822a22567ddf353d5346a1a7526b8229836..80874b15e03ddeae7ef808cbfe6b291420c4119a 100644 (file)
@@ -1,5 +1,5 @@
 // GROUPS passed vtable
-extern "C" printf(...);
+extern "C" int printf(...);
 enum { vf_request, vf_event } want;
 
 int errs = 0;
index 9ceeff1bf9e8c4e7a402daad46ac587b574de40f..75827cb8c4642093acb339ebbb90455a412530ef 100644 (file)
@@ -1,5 +1,5 @@
 // GROUPS passed
-extern "C" printf(...);
+extern "C" int printf(...);
 extern "C" void exit(int);
 
 class A {
index 6ebcb014b53c21ac6680c018f4716643f573edf4..a290b46e25a7f22afa08f4cc81c1d3093bf4bd9b 100644 (file)
@@ -1,7 +1,7 @@
 // Build don't link:
 // Special g++ Options: -pedantic-errors
 
-const ci=10, *pc = &ci, *const cpc = pc, **ppc;
+const int ci=10, *pc = &ci, *const cpc = pc, **ppc;
 int i, *p, *const cp = &i;
 
 main()
index 927184a211a91bee19d0baaa4bf128d067248227..c36151c88a9e1f244178b123dd07d3b592bd7c12 100644 (file)
@@ -1,7 +1,7 @@
 // Build don't link:
 // Special g++ Options: -pedantic-errors
 
-const ci=10, *pc = &ci, *const cpc = pc, **ppc;
+const int ci=10, *pc = &ci, *const cpc = pc, **ppc;
 int i, *p, *const cp = &i;
 
 main()
index 0cc9a03775e150b6fb7ec1afd5cdabfbd4fe1d9e..c805818e0ea5888fd0dffbfe7a62fc9c6049abe5 100644 (file)
@@ -1,5 +1,5 @@
 // GROUPS passed vtable
-extern "C" printf (const char *, ...);
+extern "C" int printf (const char *, ...);
 extern "C" void exit(int);
 
 class A {
index 1f88a830a2698f474a18de7919953641b4032e4f..ff7266f150c8decf42b7a71a2733c3b9d776468c 100644 (file)
@@ -1,5 +1,5 @@
 // GROUPS vtable
-extern "C" printf (const char *, ...);
+extern "C" int printf (const char *, ...);
 
 class A
 {
index a145b1ecbce0fad5691bf9f3c2eccf1525d8eba7..c64aa75bd112cc3ba992714e6dc38092075ad1b9 100644 (file)
@@ -472,14 +472,14 @@ Graph<T>::V1(Pix vx, Pix x) const
 
 class STRLIdentifier;
 
-extern x(List_DL<STRLIdentifier *>);
-extern x(List_DLS<STRLIdentifier *>);
+extern int x(List_DL<STRLIdentifier *>);
+extern int x(List_DLS<STRLIdentifier *>);
 
-extern x(Set<STRLIdentifier *>);
-extern x(Set_DL<STRLIdentifier *>);
-extern x(Set_DLp<STRLIdentifier *>);
+extern int x(Set<STRLIdentifier *>);
+extern int x(Set_DL<STRLIdentifier *>);
+extern int x(Set_DLp<STRLIdentifier *>);
 
-extern x(Graph<STRLIdentifier *>);
+extern int x(Graph<STRLIdentifier *>);
 
 class STRLIdentifier {
     char buf[10];
@@ -488,7 +488,7 @@ class STRLIdentifier {
 extern int operator==(vertex<STRLIdentifier*>&, vertex<STRLIdentifier*>&); // ERROR - const subversion
 extern int operator==(STRLIdentifier&, STRLIdentifier&); // ERROR - fn ref in err msg
 
-extern x(List_DLSp<STRLIdentifier *>);
+extern int x(List_DLSp<STRLIdentifier *>);
 
 template class Graph<STRLIdentifier *>;
 template class List_DLS<vertex<STRLIdentifier *> >;