]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Relative to g++.dg/special:
authorZack Weinberg <zack@wolery.cumb.org>
Sun, 28 May 2000 05:38:02 +0000 (05:38 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sun, 28 May 2000 05:38:02 +0000 (05:38 +0000)
* conpr-1.C, conpr-2.C, conpr-3.C: Include stdlib.h.

Relative to g++.old-deja:
* g++.brendan/complex1.C, g++.jason/optimize2.C,
g++.mike/p9732b.C, g++.other/addrof1.C, g++.other/dyncast5.C,
g++.other/init5.C, g++.other/init7.C, g++.other/union2.C,
g++.pt/vbase1.C, g++.robertl/eb14.C, g++.robertl/eh990323-1.C,
g++.robertl/eh990323-2.C, g++.robertl/eh990323-3.C,
g++.robertl/eh990323-4.C, g++.robertl/eh990323-5.C,
g++.robertl/ice990323-2.C: Prototype exit and/or abort.

* g++.brendan/nest21.C, g++.eh/rethrow3.C, g++.jason/init3.C,
g++.law/arm15.C, g++.law/cvt2.C, g++.law/visibility17.C,
g++.mike/eh23.C, g++.mike/eh25.C, g++.mike/eh34.C,
g++.mike/eh48.C, g++.mike/eh55.C, g++.mike/p2736.C,
g++.oliva/new1.C, g++.other/align.C, g++.robertl/eb39.C,
g++.robertl/eb54.C, g++.robertl/eb63.C: Include stdlib.h
and/or string.h.

* g++.other/goto1.C: Update expectations for error messages.

From-SVN: r34226

39 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/special/conpr-1.C
gcc/testsuite/g++.dg/special/conpr-2.C
gcc/testsuite/g++.dg/special/conpr-3.C
gcc/testsuite/g++.old-deja/g++.brendan/complex1.C
gcc/testsuite/g++.old-deja/g++.brendan/nest21.C
gcc/testsuite/g++.old-deja/g++.eh/rethrow3.C
gcc/testsuite/g++.old-deja/g++.jason/init3.C
gcc/testsuite/g++.old-deja/g++.jason/optimize2.C
gcc/testsuite/g++.old-deja/g++.law/arm15.C
gcc/testsuite/g++.old-deja/g++.law/cvt2.C
gcc/testsuite/g++.old-deja/g++.law/visibility17.C
gcc/testsuite/g++.old-deja/g++.mike/eh23.C
gcc/testsuite/g++.old-deja/g++.mike/eh25.C
gcc/testsuite/g++.old-deja/g++.mike/eh34.C
gcc/testsuite/g++.old-deja/g++.mike/eh48.C
gcc/testsuite/g++.old-deja/g++.mike/eh55.C
gcc/testsuite/g++.old-deja/g++.mike/p2736.C
gcc/testsuite/g++.old-deja/g++.mike/p9732b.C
gcc/testsuite/g++.old-deja/g++.oliva/new1.C
gcc/testsuite/g++.old-deja/g++.other/addrof1.C
gcc/testsuite/g++.old-deja/g++.other/align.C
gcc/testsuite/g++.old-deja/g++.other/dyncast5.C
gcc/testsuite/g++.old-deja/g++.other/goto1.C
gcc/testsuite/g++.old-deja/g++.other/init5.C
gcc/testsuite/g++.old-deja/g++.other/init7.C
gcc/testsuite/g++.old-deja/g++.other/union2.C
gcc/testsuite/g++.old-deja/g++.pt/vbase1.C
gcc/testsuite/g++.old-deja/g++.robertl/eb14.C
gcc/testsuite/g++.old-deja/g++.robertl/eb39.C
gcc/testsuite/g++.old-deja/g++.robertl/eb44.C
gcc/testsuite/g++.old-deja/g++.robertl/eb54.C
gcc/testsuite/g++.old-deja/g++.robertl/eb63.C
gcc/testsuite/g++.old-deja/g++.robertl/eh990323-1.C
gcc/testsuite/g++.old-deja/g++.robertl/eh990323-2.C
gcc/testsuite/g++.old-deja/g++.robertl/eh990323-3.C
gcc/testsuite/g++.old-deja/g++.robertl/eh990323-4.C
gcc/testsuite/g++.old-deja/g++.robertl/eh990323-5.C
gcc/testsuite/g++.old-deja/g++.robertl/ice990323-2.C

index fc1cbf91a79c1d8a3743e6ff1f1d5ed044a85ea4..9d735e707a097b7222c4a920cc9a84799649156c 100644 (file)
@@ -1,3 +1,27 @@
+2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
+
+       Relative to g++.dg/special:
+       * conpr-1.C, conpr-2.C, conpr-3.C: Include stdlib.h.
+
+       Relative to g++.old-deja:
+       * g++.brendan/complex1.C, g++.jason/optimize2.C,
+       g++.mike/p9732b.C, g++.other/addrof1.C, g++.other/dyncast5.C,
+       g++.other/init5.C, g++.other/init7.C, g++.other/union2.C,
+       g++.pt/vbase1.C, g++.robertl/eb14.C, g++.robertl/eh990323-1.C,
+       g++.robertl/eh990323-2.C, g++.robertl/eh990323-3.C, 
+       g++.robertl/eh990323-4.C, g++.robertl/eh990323-5.C,
+       g++.robertl/ice990323-2.C: Prototype exit and/or abort.
+
+       * g++.brendan/nest21.C, g++.eh/rethrow3.C, g++.jason/init3.C,
+       g++.law/arm15.C, g++.law/cvt2.C, g++.law/visibility17.C,
+       g++.mike/eh23.C, g++.mike/eh25.C, g++.mike/eh34.C,
+       g++.mike/eh48.C, g++.mike/eh55.C, g++.mike/p2736.C,
+       g++.oliva/new1.C, g++.other/align.C, g++.robertl/eb39.C,
+       g++.robertl/eb54.C, g++.robertl/eb63.C: Include stdlib.h
+       and/or string.h.
+
+       * g++.other/goto1.C: Update expectations for error messages.
+
 2000-05-25  Alexandre Oliva  <aoliva@cygnus.com>
 
        * gcc.c-torture/compile/20000523-1.c: New test.
index 8ab6bfee2584186df550ee07248d7f8145ec5341..c91753dc4959c0637057f87106a615ae43cb5db4 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run } */
 
+#include <stdlib.h>
+
 class foo_t {
     int x;
 public:
index 07ba8ab9e89b1a1e283091059422dcc3d93fa72d..c5fc235e779bed9a38848526fd090ccb12107198 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run } */
 
+#include <stdlib.h>
+
 class foo_t {
     int x;
     static int count;
index 07ba8ab9e89b1a1e283091059422dcc3d93fa72d..c5fc235e779bed9a38848526fd090ccb12107198 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run } */
 
+#include <stdlib.h>
+
 class foo_t {
     int x;
     static int count;
index f6998fd349496a5b8724a3b3720a9bb2fe7543b9..74a91b36c9f3ad2a647b9fa02f451b374ca33b8d 100644 (file)
@@ -5,7 +5,10 @@
 // a bug where the compiler was not converting the integer `90' to a
 // complex number, unless you did `90.0'.  Fixed 10/1/1997.
 
-extern "C" int printf (const char *, ...);
+extern "C" {
+int printf (const char *, ...);
+void exit (int);
+};
 
 __complex__ double cd;
 
index f32166d9ad25e3250a91a07e81983d3fe7139dc6..b866a3e505706ce3058811372b030de627da7025 100644 (file)
@@ -1,6 +1,7 @@
 // GROUPS passed nested-classes
 #include <iostream.h>
 #include <stdio.h>
+#include <string.h>
 
 static char output[1024];
 
index 5da2081b1b9f7d8a14298e34d147a3340d777e22..5ab25d66fd41e46f8df17c9a7d5c288a50933595 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <exception>
 
 static void
index ae8693195ca9b161de98c1a0da03929a4d281e72..03f1dbff04a5313aefeaefeea21631d8a76a79c6 100644 (file)
@@ -1,8 +1,7 @@
 // PRMS Id: 5652
 // Bug: strings does not get initialized.
 
-extern "C" void * memcpy (void *, const void *, __SIZE_TYPE__);
-extern "C" int strcmp (const char *, const char *);
+#include <string.h>
 
 class My_string {
    char *str;
index 0d4e17752c751f93976ce01d3cca883b2e670c3f..ade45317ac90997c3510ea6434035dfbff60c6eb 100644 (file)
@@ -1,6 +1,8 @@
 // Used to crash on the alpha with optimization.
 // Special g++ Options: -w
 
+extern "C" void abort (void);
+
 struct Fix {
   unsigned short l;
 };
index 639c1fc5e8b112f227c114278fbb07eb94d24074..1d4168075c78f7eecd29bd165c20f8fc097cac92 100644 (file)
@@ -6,6 +6,7 @@
 // Message-ID: <9310211510.AA14943@holden.lulea.trab.se>
 
 #include <stdio.h>
+#include <stdlib.h>
 
 int state = 0;
 
index 4c28a7e6bd0694a67b6ea570e1e39b60cb21ff31..7d3e03453e08b23e1a58cb9dd9df68994a5702c3 100644 (file)
@@ -1,13 +1,10 @@
 // GROUPS passed conversions
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <iostream.h>
 #include <fstream.h>
 
-extern "C" {
-int strncmp (const char *, const char *, size_t);
-}
-
 class cvec {
 public:
         ~cvec(){ delete s; }
index 125bf00f0677102d96f5224f1926f458ffab84a6..fa4d6db69b9730453a98c2cfea7f7acfada58b64 100644 (file)
@@ -6,6 +6,7 @@
 // Subject:  Access to private constructor.
 // Message-ID: <9308060023.AA10283@neptune.caere.com>
 #include <iostream.h>
+#include <string.h>
 
 class Base
 {
index 27fc53d8eebf51fb14bec94a4d6c4e454bf72c24..2383875206abf65231191db8831eb74887583881 100644 (file)
@@ -2,6 +2,7 @@
 // excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
 
 #include <exception>
+#include <stdlib.h>
 
 struct double_fault { };
 int fault_now;
index 52754b5335930e79b956aababdc91bd41e56f8bd..a179abcfe6ef4a42424bf857b863068c320481c4 100644 (file)
@@ -2,6 +2,7 @@
 // excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
 
 #include <exception>
+#include <stdlib.h>
 
 void my_terminate() {
   exit (0);            // Double faults should call terminate
index 9c7e985bbea7a62040759a26fc66400b223ab244..ca3d73b390c7c5b3dac338170bf1ab95a41aaf3d 100644 (file)
@@ -2,6 +2,7 @@
 // excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
 
 #include <exception>
+#include <stdlib.h>
 
 void my_unexpected() {
   exit (0);
index 351fc4f60a852fd2475ec53f8680bad64c0b1882..dd4e2a2a38f38e35a1f11e3f4f6d62ebd7b7ff49 100644 (file)
@@ -2,6 +2,8 @@
 // excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
 
 #include <exception>
+#include <stdlib.h>
+
 using std::uncaught_exception;
 class A {
 public:
index e64bcf823745eccefe767c8bc9e87c1805943bb9..d61d033e97b9ba210bb2b5eaa1a5657b66f2b30c 100644 (file)
@@ -2,6 +2,7 @@
 // excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
 
 #include <exception>
+#include <stdlib.h>
 
 void my_terminate_handler() {
   exit(0);
index 7a0405196ecfff6356b085a0e21d53f8e3029364..43d81e4b63b600d9ee1db1aadfde48e4d370c95a 100644 (file)
@@ -2,6 +2,8 @@
 // statics are destroyed at the right time.  See PR 2736 for details.
 // prms-id: 2736
 
+#include <stdlib.h>
+
 int count;
 
 struct A {
index 59cfe4c578d81e9887f536c595c135624038e901..d4d200a28c95f52e244b888fc8925aa1608e7e78 100644 (file)
@@ -3,8 +3,10 @@
 int count;
 int bail = 0;
 
+extern "C" void abort (void);
 extern "C" void _exit (int);
 
+
 struct base {
   base () { ++count; }
   ~base () { --count; }
index 67c050b5fd6a9d131966e754f63c3f5f334843a9..074b5e8cb31019bb804e327466b87480e93b0eed 100644 (file)
@@ -7,6 +7,7 @@
 // execution test
 
 #include <new>
+#include <stdlib.h>
 
 struct A {
   A() { throw 0; }
index b4d55f6a21b9cd07e9a7e16d4d388324599426ac..fda09923b76a6ea310b209a832cd1c0dcbb17449 100644 (file)
@@ -1,3 +1,6 @@
+
+extern "C" void abort ();
+
 typedef struct st {
         unsigned char   a;
         unsigned char   b;
index 4ac1d54ecf19983490326164072bae11b9f8f636..f5cc8508313b575b42f1ba9fb4a8b0eaad869cf7 100644 (file)
@@ -1,4 +1,5 @@
 // Build don't link:
+#include <string.h>
 
 class bar {
 public:
index 65a28523ec1fcf99346810fcc5e80387fc5f85ff..a6992d76247abea05533edb27cc853d41d83371f 100644 (file)
@@ -3,6 +3,8 @@
 
 // dynamic cast can only cast to public unambiguous bases
 
+extern "C" void abort ();
+
 struct A {virtual ~A(){} int m; };
 struct B {virtual ~B(){} int m; };
 
index 77da8e58b90bc28cd2874d46d6d9332e5bd934ed..0839ee5e1427097bb758dc1aae1b6fc9990d3c45 100644 (file)
@@ -10,12 +10,12 @@ struct S
 void f ()
 {
   {
-    S s1;
+    S s1; // ERROR - skips initialization
   
-  t:
+  t:     // ERROR - jump to label
     S s2;
     ;
   }
 
-  goto t; // ERROR - jump avoids initialization of `s1'
+  goto t; // ERROR - from here
 }
index 3f4785e360eb5264d106ad88677b356089980be9..92b1d329ec0318e218a0177fed28919f8483fc86 100644 (file)
@@ -2,6 +2,8 @@
 // Original test attributed to James Kanze <jkanze@otelo.ibmmail.com>
 // execution test - XFAIL *-*-*
 
+extern "C" void abort ();
+
 static int cnt;
 
 class A {
index 3b17da029e83999daa35f69be9fb1c36002c37d7..1ecc39afc83dc9ce26a712665d1268669b859514 100644 (file)
@@ -4,6 +4,8 @@
 // The initialization of a static local variable must be retried if a
 // previous try finished by throwing an exception [stmt.dcl]/4
 
+extern "C" void abort ();
+
 struct foo {
   foo() { throw true; }
 };
index 32dd26c97a52db879dfce0b80d84a3a74c5454fc..e2daea32e3e0707d25b1c45d7f210a7801e3401c 100644 (file)
@@ -2,6 +2,8 @@
 // Bug: gcc and g++ didn't zero unions with empty initializers.
 // Submitted by J"orn Rennecke <amylaar@cygnus.co.uk>
 
+extern "C" void exit (int);
+
 typedef union u
 {
   union u *up;
index 58d26fcf2add8caeefbbfdc523200a037acb9f38..d3868172669347f370a5d3a90a35478c558b35be 100644 (file)
@@ -1,6 +1,8 @@
 // Check that template classes handle inherited virtual bases
 // properly, initializing them before direct non-virtual bases.
 
+extern "C" void exit (int);
+
 int aflag;
 
 struct A
index de00e7baa6be5813401b1ee8f82cf91d1895797a..2a0fa52bd48d21de4200a033cc4ed28e343ee4ad 100644 (file)
@@ -1,3 +1,6 @@
+
+extern "C" void abort ();
+
 template<int N>
 struct I {
 };
index feefca77ad938a0d04772f54214aca620d62293b..edf6ad42420bd1aaf26b87f888fbea943f284bf2 100644 (file)
@@ -4,6 +4,7 @@
 // #include <streambuf.h>
 #include <libio.h>
 #include <strstream.h>
+#include <string.h>
 
 extern bool foo2 (ostream &out, istream &in);
 
index 54eab1536090167e11975b38fea147edf764a3ac..b02b9aafc8e9d610f63dc65a4d60176503362341 100644 (file)
@@ -5,6 +5,7 @@
 // friend function, the non-template function does
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <iostream.h>
 
 template <class T>
index dfcf3a9e927deacd06e5b38ffdeef243baca7a49..bcf9968d1213897dab3b85248a79b511e56117e0 100644 (file)
@@ -1,4 +1,5 @@
 #include <iomanip.h>
+#include <stdlib.h>
 
 int main()
 {
index 0e8559124d62326c372a27eacd60238a7f25e063..671fe81320065087e5b400300b87bbe58c552554 100644 (file)
@@ -1,6 +1,7 @@
 //Special g++ Options:
 //This uses GNU extensions, so disable -ansi
 #include <stdio.h>
+#include <stdlib.h>
 
 class A {
 public:
index ef6d2dc77e1e6730dae39ae4d11cb32f35d311dc..40df1551d00797d3872aa05d83791a56dbfe8762 100644 (file)
@@ -1,4 +1,6 @@
 // check cleanup of template temporaries
+extern "C" void abort ();
+extern "C" void exit (int);
 
 int ctor = 0;
 int dtor = 0;
index 90d93ad92118fdff76f798ec14ffce212fb2f91e..d672814ba19cc8ac26e1f40e662710b106867642 100644 (file)
@@ -1,4 +1,6 @@
 // check MI and VBC offsets on throw
+extern "C" void abort ();
+extern "C" void exit (int);
 
 struct A {
        int x[23];
index 5d945154aafa213b7a0a80a311acaac01e44acef..9dce31cb787fd6b6a20bdc1b3ddfe48797da737f 100644 (file)
@@ -1,4 +1,6 @@
 // try throwing 0 cast to a class object
+extern "C" void abort ();
+extern "C" void exit (int);
 
 struct A {};
 
index 315a78b4bb15c09c078547149c5e423e8ddcd6e4..3884015234ab6328022920c9edf85e9edccb342c 100644 (file)
@@ -1,4 +1,6 @@
 // check MI and VBC offsets on throw
+extern "C" void abort ();
+extern "C" void exit (int);
 
 struct A {
        int x[23];
index 7f52a9b8d86e233a34b2342ac1349c485a309006..87718d22c384ff0fe669c9cde12722184a665e63 100644 (file)
@@ -1,4 +1,6 @@
 // check cleanup of partial array objects
+extern "C" void abort (void);
+extern "C" void exit (int);
 
 int ctor = 0;
 int dtor = 0;
index 0686ee5748d9e15068aa3f08153f57949cf4c87e..5d08ada1be37b58d7d7de82450fd85eaa840910e 100644 (file)
@@ -1,4 +1,6 @@
 // check EH with templates
+extern "C" void abort ();
+extern "C" void exit (int);
 
 template <class T, int n, class U> struct A {
        A() {}