array1.C: Modify explicit external libc references to printf & atoi to conform to ANSI...

* g++.old-deja/g++.brendan/array1.C: Modify explicit external libc
	references to printf & atoi to conform to ANSI standard.
	* g++.old-deja/g++.brendan/code-gen1.C: Likewise.
	* g++.old-deja/g++.brendan/code-gen2.C: Likewise.
	* g++.old-deja/g++.brendan/code-gen3.C: Likewise.
	* g++.old-deja/g++.brendan/code-gen4.C: Likewise.
	* g++.old-deja/g++.brendan/code-gen6.C: Likewise.
	* g++.old-deja/g++.brendan/complex1.C: Likewise.
	* g++.old-deja/g++.brendan/copy1.C: Likewise.
	* g++.old-deja/g++.brendan/copy2.C: Likewise.
	* g++.old-deja/g++.brendan/copy3.C: Likewise.
	* g++.old-deja/g++.brendan/copy4.C: Likewise.
	* g++.old-deja/g++.brendan/copy5.C: Likewise.
	* g++.old-deja/g++.brendan/copy6.C: Likewise.
	* g++.old-deja/g++.brendan/copy7.C: Likewise.
	* g++.old-deja/g++.brendan/copy8.C: Likewise.
	* g++.old-deja/g++.brendan/crash11.C: Likewise.
	* g++.old-deja/g++.brendan/crash14.C: Likewise.
	* g++.old-deja/g++.brendan/ctors1.C: Likewise.
	* g++.old-deja/g++.brendan/ctors2.C: Likewise.
	* g++.old-deja/g++.brendan/delete2.C: Likewise.
	* g++.old-deja/g++.brendan/dtors1.C: Likewise.
	* g++.old-deja/g++.brendan/dtors2.C: Likewise.
	* g++.old-deja/g++.brendan/dtors3.C: Likewise.
	* g++.old-deja/g++.brendan/eh1.C: Likewise.
	* g++.old-deja/g++.brendan/groff1.C: Likewise.
	* g++.old-deja/g++.brendan/init3.C: Likewise.
	* g++.old-deja/g++.brendan/misc12.C: Likewise.
	* g++.old-deja/g++.brendan/misc7.C: Likewise.
	* g++.old-deja/g++.brendan/new2.C: Likewise.
	* g++.old-deja/g++.brendan/operators4.C: Likewise.
	* g++.old-deja/g++.brendan/operators5.C: Likewise.
	* g++.old-deja/g++.brendan/overload2.C: Likewise.
	* g++.old-deja/g++.brendan/overload7.C: Likewise.
	* g++.old-deja/g++.brendan/redecl2.C: Likewise.
	* g++.old-deja/g++.brendan/reference1.C: Likewise.
	* g++.old-deja/g++.brendan/sizeof5.C: Likewise.
	* g++.old-deja/g++.brendan/template24.C: Likewise.
	* g++.old-deja/g++.brendan/template3.C: Likewise.
	* g++.old-deja/g++.brendan/vtables1.C: Likewise.
	* g++.old-deja/g++.jason/inline3.C: Likewise.
	* g++.old-deja/g++.jason/opeq.C: Likewise.
	* g++.old-deja/g++.law/arg5.C: Likewise.
	* g++.old-deja/g++.law/arm7.C: Likewise.
	* g++.old-deja/g++.law/ctors11.C: Likewise.
	* g++.old-deja/g++.law/cvt8.C: Likewise.
	* g++.old-deja/g++.law/init9.C: Likewise.
	* g++.old-deja/g++.law/refs4.C: Likewise.
	* g++.old-deja/g++.law/template2.C: Likewise.
	* g++.old-deja/g++.law/visibility24.C: Likewise.
	* g++.old-deja/g++.law/vtable3.C: Likewise.
	* g++.old-deja/g++.mike/asm2.C: Likewise.
	* g++.old-deja/g++.mike/eh1.C: Likewise.
	* g++.old-deja/g++.mike/misc1.C: Likewise.
	* g++.old-deja/g++.mike/misc13.C: Likewise.
	* g++.old-deja/g++.mike/misc14.C: Likewise.
	* g++.old-deja/g++.mike/ns12.C: Likewise.
	* g++.old-deja/g++.mike/p1248.C: Likewise.
	* g++.old-deja/g++.mike/p3708.C: Likewise.
	* g++.old-deja/g++.mike/p3708a.C: Likewise.
	* g++.old-deja/g++.mike/p3708b.C: Likewise.
	* g++.old-deja/g++.mike/p646.C: Likewise.
	* g++.old-deja/g++.mike/p700.C: Likewise.
	* g++.old-deja/g++.mike/p783.C: Likewise.
	* g++.old-deja/g++.mike/p783a.C: Likewise.
	* g++.old-deja/g++.mike/p783b.C: Likewise.
	* g++.old-deja/g++.mike/p786.C: Likewise.
	* g++.old-deja/g++.mike/p789.C: Likewise.
	* g++.old-deja/g++.mike/p789a.C: Likewise.
	* g++.old-deja/g++.mike/p807a.C: Likewise.
	* g++.old-deja/g++.other/delete3.C: Likewise.
	* g++.old-deja/g++.other/dyncast1.C: Likewise.
	* g++.old-deja/g++.other/dyncast2.C: Likewise.
	* g++.old-deja/g++.other/dyncast3.C: Likewise.
	* g++.old-deja/g++.other/empty1.C: Likewise.
	* g++.old-deja/g++.other/temporary1.C: Likewise.
	* g++.old-deja/g++.pt/memtemp14.C: Likewise.
	* g++.old-deja/g++.pt/t16.C: Likewise.
	* g++.old-deja/g++.pt/tiemann2.C: Likewise.

From-SVN: r31204
This commit is contained in:
Kaveh R. Ghazi 2000-01-04 15:52:23 +00:00 committed by Kaveh Ghazi
parent d7a2940444
commit 3f552d62f4
79 changed files with 162 additions and 83 deletions

View File

@ -1,3 +1,85 @@
2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.brendan/array1.C: Modify explicit external libc
references to printf & atoi to conform to ANSI standard.
* g++.old-deja/g++.brendan/code-gen1.C: Likewise.
* g++.old-deja/g++.brendan/code-gen2.C: Likewise.
* g++.old-deja/g++.brendan/code-gen3.C: Likewise.
* g++.old-deja/g++.brendan/code-gen4.C: Likewise.
* g++.old-deja/g++.brendan/code-gen6.C: Likewise.
* g++.old-deja/g++.brendan/complex1.C: Likewise.
* g++.old-deja/g++.brendan/copy1.C: Likewise.
* g++.old-deja/g++.brendan/copy2.C: Likewise.
* g++.old-deja/g++.brendan/copy3.C: Likewise.
* g++.old-deja/g++.brendan/copy4.C: Likewise.
* g++.old-deja/g++.brendan/copy5.C: Likewise.
* g++.old-deja/g++.brendan/copy6.C: Likewise.
* g++.old-deja/g++.brendan/copy7.C: Likewise.
* g++.old-deja/g++.brendan/copy8.C: Likewise.
* g++.old-deja/g++.brendan/crash11.C: Likewise.
* g++.old-deja/g++.brendan/crash14.C: Likewise.
* g++.old-deja/g++.brendan/ctors1.C: Likewise.
* g++.old-deja/g++.brendan/ctors2.C: Likewise.
* g++.old-deja/g++.brendan/delete2.C: Likewise.
* g++.old-deja/g++.brendan/dtors1.C: Likewise.
* g++.old-deja/g++.brendan/dtors2.C: Likewise.
* g++.old-deja/g++.brendan/dtors3.C: Likewise.
* g++.old-deja/g++.brendan/eh1.C: Likewise.
* g++.old-deja/g++.brendan/groff1.C: Likewise.
* g++.old-deja/g++.brendan/init3.C: Likewise.
* g++.old-deja/g++.brendan/misc12.C: Likewise.
* g++.old-deja/g++.brendan/misc7.C: Likewise.
* g++.old-deja/g++.brendan/new2.C: Likewise.
* g++.old-deja/g++.brendan/operators4.C: Likewise.
* g++.old-deja/g++.brendan/operators5.C: Likewise.
* g++.old-deja/g++.brendan/overload2.C: Likewise.
* g++.old-deja/g++.brendan/overload7.C: Likewise.
* g++.old-deja/g++.brendan/redecl2.C: Likewise.
* g++.old-deja/g++.brendan/reference1.C: Likewise.
* g++.old-deja/g++.brendan/sizeof5.C: Likewise.
* g++.old-deja/g++.brendan/template24.C: Likewise.
* g++.old-deja/g++.brendan/template3.C: Likewise.
* g++.old-deja/g++.brendan/vtables1.C: Likewise.
* g++.old-deja/g++.jason/inline3.C: Likewise.
* g++.old-deja/g++.jason/opeq.C: Likewise.
* g++.old-deja/g++.law/arg5.C: Likewise.
* g++.old-deja/g++.law/arm7.C: Likewise.
* g++.old-deja/g++.law/ctors11.C: Likewise.
* g++.old-deja/g++.law/cvt8.C: Likewise.
* g++.old-deja/g++.law/init9.C: Likewise.
* g++.old-deja/g++.law/refs4.C: Likewise.
* g++.old-deja/g++.law/template2.C: Likewise.
* g++.old-deja/g++.law/visibility24.C: Likewise.
* g++.old-deja/g++.law/vtable3.C: Likewise.
* g++.old-deja/g++.mike/asm2.C: Likewise.
* g++.old-deja/g++.mike/eh1.C: Likewise.
* g++.old-deja/g++.mike/misc1.C: Likewise.
* g++.old-deja/g++.mike/misc13.C: Likewise.
* g++.old-deja/g++.mike/misc14.C: Likewise.
* g++.old-deja/g++.mike/ns12.C: Likewise.
* g++.old-deja/g++.mike/p1248.C: Likewise.
* g++.old-deja/g++.mike/p3708.C: Likewise.
* g++.old-deja/g++.mike/p3708a.C: Likewise.
* g++.old-deja/g++.mike/p3708b.C: Likewise.
* g++.old-deja/g++.mike/p646.C: Likewise.
* g++.old-deja/g++.mike/p700.C: Likewise.
* g++.old-deja/g++.mike/p783.C: Likewise.
* g++.old-deja/g++.mike/p783a.C: Likewise.
* g++.old-deja/g++.mike/p783b.C: Likewise.
* g++.old-deja/g++.mike/p786.C: Likewise.
* g++.old-deja/g++.mike/p789.C: Likewise.
* g++.old-deja/g++.mike/p789a.C: Likewise.
* g++.old-deja/g++.mike/p807a.C: Likewise.
* g++.old-deja/g++.other/delete3.C: Likewise.
* g++.old-deja/g++.other/dyncast1.C: Likewise.
* g++.old-deja/g++.other/dyncast2.C: Likewise.
* g++.old-deja/g++.other/dyncast3.C: Likewise.
* g++.old-deja/g++.other/empty1.C: Likewise.
* g++.old-deja/g++.other/temporary1.C: Likewise.
* g++.old-deja/g++.pt/memtemp14.C: Likewise.
* g++.old-deja/g++.pt/t16.C: Likewise.
* g++.old-deja/g++.pt/tiemann2.C: Likewise.
1999-12-30 Bernd Schmidt <bernds@cygnus.co.uk> 1999-12-30 Bernd Schmidt <bernds@cygnus.co.uk>
* gcc.dg/991230-1.c: New test. * gcc.dg/991230-1.c: New test.

View File

@ -2,6 +2,6 @@
// Special g++ Options: -fconserve-space -fcommon // Special g++ Options: -fconserve-space -fcommon
// GROUPS passed array-bindings // GROUPS passed array-bindings
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
char array[~(~0ul>>1)|~(0ul>>3)]; // ERROR - overflow in array dimension.* char array[~(~0ul>>1)|~(0ul>>3)]; // ERROR - overflow in array dimension.*
int main () { printf ("PASS\n"); return 0; } int main () { printf ("PASS\n"); return 0; }

View File

@ -2,7 +2,7 @@
// Check that sub-word sized structs/classes are passed correctly // Check that sub-word sized structs/classes are passed correctly
// if the struct/class has a constructor (i.e. ANY constructor). // if the struct/class has a constructor (i.e. ANY constructor).
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct base { struct base {
unsigned int f1 : 8; unsigned int f1 : 8;

View File

@ -2,7 +2,7 @@
// Check that declarations with initializations are executed // Check that declarations with initializations are executed
// correctly. // correctly.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int main () int main ()
{ {

View File

@ -2,7 +2,7 @@
// Check that passing things which are not a multiple of // Check that passing things which are not a multiple of
// 4 bytes in size doesn't mess up other subsequent parameters. // 4 bytes in size doesn't mess up other subsequent parameters.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct base { struct base {
int f1 : 8; int f1 : 8;

View File

@ -9,7 +9,7 @@
// //
// Workaround - declare "f1_arg" as type "short int". // Workaround - declare "f1_arg" as type "short int".
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
short int v2; short int v2;

View File

@ -2,7 +2,7 @@
// Check that type float parameters can be correctly passed to // Check that type float parameters can be correctly passed to
// methods. // methods.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
class tres_floats { class tres_floats {
float ff1; float ff1;

View File

@ -5,7 +5,7 @@
// a bug where the compiler was not converting the integer `90' to a // a bug where the compiler was not converting the integer `90' to a
// complex number, unless you did `90.0'. Fixed 10/1/1997. // complex number, unless you did `90.0'. Fixed 10/1/1997.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
__complex__ double cd; __complex__ double cd;

View File

@ -1,5 +1,5 @@
// GROUPS passed copy-ctors // GROUPS passed copy-ctors
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int count = 0; int count = 0;
class C { class C {

View File

@ -27,7 +27,7 @@ Post foo
*/ */
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int count = 0; int count = 0;

View File

@ -18,7 +18,7 @@ If I compile it with g++ (gcc version 2.2.2) and run it I get:
A::~A() A::~A()
*/ */
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int count = 0; int count = 0;

View File

@ -17,7 +17,7 @@
// ~A() // ~A()
// ~A() // ~A()
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int count = 0; int count = 0;

View File

@ -21,7 +21,7 @@ BaseClass::Increm --> {i=7, virtMember()=30}
b=9 b.virtMember()=30 b=9 b.virtMember()=30
*/ */
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
void die () { printf ("FAIL\n"); exit (1); } void die () { printf ("FAIL\n"); exit (1); }

View File

@ -24,7 +24,7 @@ constructing from unsigned
*/ */
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int count = 0; int count = 0;

View File

@ -1,5 +1,5 @@
// GROUPS passed copy-ctors // GROUPS passed copy-ctors
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
void die () { printf ("FAIL\n"); exit (1); } void die () { printf ("FAIL\n"); exit (1); }

View File

@ -17,7 +17,7 @@ typescript that lists the program, shows how I compiled it, and shows the
incorrect output. incorrect output.
*/ */
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int count = 0; int count = 0;

View File

@ -1,6 +1,6 @@
// Build don't link: // Build don't link:
// GROUPS passed old-abort // GROUPS passed old-abort
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
class A { class A {
int i; // ERROR - private int i; // ERROR - private

View File

@ -1,6 +1,6 @@
// Build don't link: // Build don't link:
// GROUPS passed old-abort // GROUPS passed old-abort
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
class cl class cl

View File

@ -1,7 +1,7 @@
// GROUPS passed constructors // GROUPS passed constructors
// Check that global level object constructors get called. // Check that global level object constructors get called.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct base { struct base {
int f1; int f1;

View File

@ -2,7 +2,7 @@
// Check that sub-words sized class members are correctly set // Check that sub-words sized class members are correctly set
// by constructors. // by constructors.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct base { struct base {
int f1 : 8; int f1 : 8;

View File

@ -2,7 +2,7 @@
// Check that using the delete operator with a null pointer // Check that using the delete operator with a null pointer
// is allowed (as called for by The Book, pg. 259) // is allowed (as called for by The Book, pg. 259)
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct base { struct base {
int member; int member;

View File

@ -5,7 +5,7 @@
// //
// (also check that this execution doesn't seg-fault) // (also check that this execution doesn't seg-fault)
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int derived_destructed; int derived_destructed;
int base_destructed; int base_destructed;

View File

@ -9,7 +9,7 @@
// the virtual table, rather than directly. This, of course, results in the // the virtual table, rather than directly. This, of course, results in the
// infinite recursion. // infinite recursion.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int errors = 0; int errors = 0;

View File

@ -6,7 +6,7 @@
// Note that in order for this test to work properly, the destructor // Note that in order for this test to work properly, the destructor
// for the base class should be explicitly declared to be virtual. // for the base class should be explicitly declared to be virtual.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int member_destructor_calls = 0; int member_destructor_calls = 0;
int middle_destructor_calls = 0; int middle_destructor_calls = 0;

View File

@ -1,7 +1,7 @@
// Special g++ Options: -O // Special g++ Options: -O
// PRMS Id: 10776 // PRMS Id: 10776
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
class Foo class Foo
{ {

View File

@ -1,7 +1,7 @@
// GROUPS passed groff // GROUPS passed groff
/* This should compile properly with the new overloading scheme. */ /* This should compile properly with the new overloading scheme. */
extern "C" void printf (const char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int win = 0; int win = 0;

View File

@ -2,7 +2,7 @@
// p2766: Make sure that members are initialized in order of declaration // p2766: Make sure that members are initialized in order of declaration
// in the class, not in order of specification in the mem-initializer list. // in the class, not in order of specification in the mem-initializer list.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int count = 0; int count = 0;

View File

@ -1,6 +1,6 @@
// GROUPS passed miscellaneous // GROUPS passed miscellaneous
extern "C" void exit (int); extern "C" void exit (int);
extern "C" int printf (char *, ...); extern "C" int printf (const char *, ...);
/* Make sure cp-lex.c handles these properly--if this links, that means /* Make sure cp-lex.c handles these properly--if this links, that means
it emitted the strings instead of __FUNCTION__.0, etc. */ it emitted the strings instead of __FUNCTION__.0, etc. */

View File

@ -1,5 +1,5 @@
// GROUPS passed miscellaneous // GROUPS passed miscellaneous
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int main() int main()
{ {

View File

@ -6,7 +6,7 @@
// of whether or not the constructor for the given class is defined // of whether or not the constructor for the given class is defined
// before or after the new operator is even declared. // before or after the new operator is even declared.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
typedef __SIZE_TYPE__ size_t; typedef __SIZE_TYPE__ size_t;

View File

@ -6,7 +6,7 @@
// //
// This test fails (in test5()) when compiled with g++ 1.34.1. // This test fails (in test5()) when compiled with g++ 1.34.1.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int function (char c); int function (char c);
int function (float f); int function (float f);

View File

@ -1,7 +1,7 @@
// GROUPS passed operators // GROUPS passed operators
// Check that operators may be (directly) recursive. // Check that operators may be (directly) recursive.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct base { struct base {
int i; int i;

View File

@ -3,7 +3,7 @@
// functions are generated even where the type of the formal // functions are generated even where the type of the formal
// arguments for the overloadings are similar or related. // arguments for the overloadings are similar or related.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int proper_method_called = 0; int proper_method_called = 0;

View File

@ -1,5 +1,5 @@
// GROUPS passed overloading // GROUPS passed overloading
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct NoName { struct NoName {

View File

@ -5,7 +5,7 @@
// of argument defaults provided, that correct values are // of argument defaults provided, that correct values are
// passed at all call points anyway. // passed at all call points anyway.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
void receiver (int ii, int jj); void receiver (int ii, int jj);

View File

@ -9,7 +9,7 @@
// This test fails with G++ 1.35.0- (pre-release). // This test fails with G++ 1.35.0- (pre-release).
// Reported 4/4/89 by Kim Smith // Reported 4/4/89 by Kim Smith
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct base { struct base {
mutable int data_member; mutable int data_member;

View File

@ -1,7 +1,7 @@
// GROUPS passed sizeof // GROUPS passed sizeof
// ARM $5.3.2 // ARM $5.3.2
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
class foo {}; class foo {};

View File

@ -1,5 +1,5 @@
// GROUPS passed templates // GROUPS passed templates
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
template <class F> template <class F>
class Temp class Temp

View File

@ -1,5 +1,5 @@
// GROUPS passed templates // GROUPS passed templates
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
int count = 0; int count = 0;

View File

@ -2,7 +2,7 @@
// Check that virtual function tables are generated and used // Check that virtual function tables are generated and used
// even for struct's/classes which have no explicit constructors. // even for struct's/classes which have no explicit constructors.
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
int base_func_member_1_called = 0; int base_func_member_1_called = 0;
int derived_func_member_1_called = 0; int derived_func_member_1_called = 0;

View File

@ -1,7 +1,7 @@
// Testcase for order of destruction. // Testcase for order of destruction.
// Special g++ Options: -O2 // Special g++ Options: -O2
extern "C" int printf( char const*, ... ); extern "C" int printf (const char *, ...);
int c; int c;
int r; int r;

View File

@ -2,7 +2,7 @@
// Bug: Generating default op= didn't set TYPE_HAS_ASSIGNMENT, so it wasn't // Bug: Generating default op= didn't set TYPE_HAS_ASSIGNMENT, so it wasn't
// found. // found.
extern "C" int printf (char *, ...); extern "C" int printf (const char *, ...);
class Y class Y
{ {

View File

@ -3,7 +3,7 @@
extern double pow(double,int*); extern double pow(double,int*);
extern "C" { extern "C" {
extern int printf(char*,...); extern int printf (const char *, ...);
extern double pow(double, double); extern double pow(double, double);
} }

View File

@ -7,7 +7,7 @@
// Date: Sat, 6 Mar 93 06:46:27 -0600 // Date: Sat, 6 Mar 93 06:46:27 -0600
extern "C" void printf(const char *,...); extern "C" int printf (const char *, ...);
class Base { class Base {
public: public:

View File

@ -4,7 +4,7 @@
// Message-Id: <9302081631.AA14744@tera.com> // Message-Id: <9302081631.AA14744@tera.com>
// From: rrh@tera.com (Robert R. Henry) // From: rrh@tera.com (Robert R. Henry)
// Date: Mon, 8 Feb 93 08:31:39 PST // Date: Mon, 8 Feb 93 08:31:39 PST
extern "C" void printf(const char *,...); extern "C" int printf (const char *, ...);
class A{ class A{
public: public:
inline A(int x){printf("constructing A with %d\n", x);} inline A(int x){printf("constructing A with %d\n", x);}

View File

@ -6,7 +6,7 @@
// Subject: g++ 2.2.2 seems to be forgetting a "const" // Subject: g++ 2.2.2 seems to be forgetting a "const"
// Date: Mon, 14 Sep 92 10:09:58 -0500 // Date: Mon, 14 Sep 92 10:09:58 -0500
extern "C" void printf(...); extern "C" int printf (const char *, ...);
struct A { struct A {
int i; int i;

View File

@ -5,7 +5,7 @@
// Subject: excess elements in aggr initzer // Subject: excess elements in aggr initzer
// Message-ID: <Pine.3.07.9306061541.A10267-b100000@fubar.cs.montana.edu> // Message-ID: <Pine.3.07.9306061541.A10267-b100000@fubar.cs.montana.edu>
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
class samp { class samp {
int a; int a;

View File

@ -1,5 +1,5 @@
// GROUPS passed references // GROUPS passed references
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
const int& min(const int& tX, const int& tY) const int& min(const int& tX, const int& tY)
{ {

View File

@ -1,6 +1,6 @@
// GROUPS passed templates // GROUPS passed templates
// Special g++ Options: -fguiding-decls // Special g++ Options: -fguiding-decls
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
template<class T> T max(T a, T b) { return a > b ? a : b; } template<class T> T max(T a, T b) { return a > b ? a : b; }

View File

@ -8,7 +8,7 @@
/* /*
* private.cc * private.cc
*/ */
extern "C" void printf(...); extern "C" int printf (const char *, ...);
template <class T> template <class T>
class A class A

View File

@ -5,7 +5,7 @@
// Subject: g++-2.6.2: Virtual inheritance causes incorrect padding // Subject: g++-2.6.2: Virtual inheritance causes incorrect padding
// Message-ID: <Pine.SOL.3.91.941128194453.7510A-100000@gabriel> // Message-ID: <Pine.SOL.3.91.941128194453.7510A-100000@gabriel>
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct A { struct A {
}; };

View File

@ -1,10 +1,7 @@
// Compile with -S, there should be no references to // Compile with -S, there should be no references to
// LTRAMP in the output. // LTRAMP in the output.
extern "C" extern "C" int printf (const char *, ...);
{
int printf (char *, ...);
}
void void
sub2 (void (*func) ()) sub2 (void (*func) ())

View File

@ -1,7 +1,7 @@
// Build don't link: // Build don't link:
// Special g++ Options: -fexceptions -O -S // Special g++ Options: -fexceptions -O -S
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" int atoi (const char *); extern "C" int atoi (const char *);
extern "C" void exit (int); extern "C" void exit (int);

View File

@ -2,7 +2,7 @@
/* g++ constructs j 13 times, and destructs it once. */ /* g++ constructs j 13 times, and destructs it once. */
extern "C" { extern "C" {
int printf(...); int printf (const char *, ...);
void exit(int); void exit(int);
} }

View File

@ -1,5 +1,5 @@
// GROUPS passed vtable // GROUPS passed vtable
extern "C" int printf(...); extern "C" int printf (const char *, ...);
enum { vf_request, vf_event } want; enum { vf_request, vf_event } want;
int errs = 0; int errs = 0;

View File

@ -1,5 +1,5 @@
// GROUPS passed // GROUPS passed
extern "C" int printf(...); extern "C" int printf (const char *, ...);
extern "C" void exit(int); extern "C" void exit(int);
class A { class A {

View File

@ -2,7 +2,7 @@ namespace {
int i = 10; int i = 10;
enum fish { one = 1, two = 2, red = 3, blue = 4 }; enum fish { one = 1, two = 2, red = 3, blue = 4 };
} }
extern "C" void printf (const char *, ...); extern "C" int printf (const char *, ...);
int main(void) int main(void)
{ {
if (i != 10) { if (i != 10) {

View File

@ -1,5 +1,5 @@
// GROUPS passed pure-virt // GROUPS passed pure-virt
extern "C" { void printf(const char *, ...); } extern "C" int printf (const char *, ...);
class Base { class Base {
public: public:
virtual ~Base() =0; virtual ~Base() =0;

View File

@ -1,7 +1,7 @@
// prms-id: 3708 // prms-id: 3708
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" int atoi (char *); extern "C" int atoi (const char *);
void *ptr; void *ptr;

View File

@ -1,7 +1,7 @@
// prms-id: 3708 // prms-id: 3708
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" int atoi (char *); extern "C" int atoi (const char *);
void *ptr; void *ptr;

View File

@ -1,6 +1,6 @@
// prms-id: 3708 // prms-id: 3708
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit(int); extern "C" void exit(int);
void *ptr; void *ptr;

View File

@ -10,7 +10,7 @@
extern "C" extern "C"
{ {
void printf (char *, ...); int printf (const char *, ...);
void abort (); void abort ();
} }

View File

@ -1628,7 +1628,7 @@ int vprintf(const char*, ... );
char* sprintf(char*, const char*, ...); int sprintf(char*, const char*, ...);
char* vsprintf(char*, const char*, ...); char* vsprintf(char*, const char*, ...);

View File

@ -1,6 +1,6 @@
// prms-id: 783 // prms-id: 783
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
class C { class C {
public: public:

View File

@ -2,7 +2,7 @@
// Deleting an object many times is a lose. // Deleting an object many times is a lose.
// prms-id: 783 // prms-id: 783
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
class C { class C {

View File

@ -3,7 +3,7 @@
// built. // built.
// prms-id: 783 // prms-id: 783
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit (int); extern "C" void exit (int);
class C { class C {

View File

@ -1,6 +1,6 @@
// prms-id: 786 // prms-id: 786
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit(int); extern "C" void exit(int);
class C class C
{ {

View File

@ -1,6 +1,6 @@
// prms-id: 789 // prms-id: 789
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct foo struct foo
{ {
static int count; static int count;

View File

@ -4,7 +4,7 @@
// used to work. :-( // used to work. :-(
// prms-id: 789 // prms-id: 789
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
struct foo struct foo
{ {
static int count; static int count;

View File

@ -3,7 +3,7 @@
// See ARM page 275 Section 12.3.2 // See ARM page 275 Section 12.3.2
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
extern "C" void exit(int); extern "C" void exit(int);
class B; class B;

View File

@ -2,7 +2,7 @@
int i; int i;
extern "C" void printf(const char*, ...); extern "C" int printf (const char *, ...);
template <class T, class U> template <class T, class U>
struct map { struct map {

View File

@ -5,7 +5,7 @@
// and therefor failing with result 0. // and therefor failing with result 0.
extern "C" void abort(); extern "C" void abort();
extern "C" void printf(const char*, ...); extern "C" int printf (const char *, ...);
static int errors = 0; static int errors = 0;
void error(int i) void error(int i)

View File

@ -5,7 +5,7 @@
// baseclasses. // baseclasses.
extern "C" void abort(); extern "C" void abort();
extern "C" void printf(const char*, ...); extern "C" int printf (const char *, ...);
static int errors = 0; static int errors = 0;

View File

@ -5,7 +5,7 @@
// and therefor failing with result 0. // and therefor failing with result 0.
extern "C" void abort(); extern "C" void abort();
extern "C" void printf(const char*, ...); extern "C" int printf (const char *, ...);
static int errors = 0; static int errors = 0;

View File

@ -1,7 +1,7 @@
// Origin: Mark Mitchell <mark@codesourcery.com> // Origin: Mark Mitchell <mark@codesourcery.com>
extern "C" void abort(); extern "C" void abort();
extern "C" void printf(const char*, ...); extern "C" int printf (const char *, ...);
int i; int i;

View File

@ -1,4 +1,4 @@
extern "C" int printf(char*, ...); extern "C" int printf (const char *, ...);
int c, d; int c, d;
class Foo class Foo

View File

@ -1,6 +1,6 @@
// Build don't run: // Build don't run:
// GROUPS passed templates membertemplates // GROUPS passed templates membertemplates
extern "C" const char* printf(const char*, ...); extern "C" int printf (const char *, ...);
template <class T> template <class T>
struct S struct S

View File

@ -1,4 +1,4 @@
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
template <class T> T max (const T&x, const T&y) template <class T> T max (const T&x, const T&y)
{ {
return (x>y)?x:y; return (x>y)?x:y;

View File

@ -1,4 +1,4 @@
extern "C" void printf (char *, ...); extern "C" int printf (const char *, ...);
template <class T> T max (const T&x, const T&y) template <class T> T max (const T&x, const T&y)
{ {
return (x>y)?x:y; return (x>y)?x:y;