This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ patch]: Kill -fstrict-prototype
- To: gcc-patches at gcc dot gnu dot org
- Subject: [C++ patch]: Kill -fstrict-prototype
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Tue, 25 Jul 2000 21:29:17 +0100
- Organization: Codesourcery LLC
Hi,
the attached patches kill the -fstrict-prototype extension. That was
allowing
void foo ();
to mean what it means in C -- an unspecified number of parameters,
rather than no parameters as C++ demands. We were implicitly turning
this flag on, inside extern "C" language scope, when -pedantic was not
given. That caused mangling differences in something like
extern "C" { typedef void CallBack ();}
void Installer (Callback); // mangled differently, depending on -pedantic
In order to maintain backwards compatibility with old systems, whose
C headers cannot be upgraded, we already have the gcc compile time
#define NO_IMPLICIT_EXTERN_C, which indicates whether (C) system headers
are C++ aware. If they are not, then we allow a function declared in a
system header with an empty parameter list to indicate an unspecified
number of parameters. C++ aware C headers must already provide full
prototypes.
built & tested on i686-pc-linux-gnu, approved by Mark
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
Kill strict_prototype. Backwards compatibility only for
non NO_IMPLICIT_EXTERN_C systems.
* cp-tree.h (flag_strict_prototype): Remove.
(strict_prototype): Remove.
(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
* decl.c (maybe_push_to_top_level): Adjust.
(pop_from_top_level): Adjust.
(decls_match): Only allow sloppy parm matching for ancient
system headers.
(init_decl_processing): Adjust.
(grokdeclarator): Adjust.
* decl2.c (flag_strict_prototype): Remove.
(strict_prototype): Remove.
(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
(lang_f_options): Remove "strict-prototype".
(unsupported-options): Add "strict-prototype".
* lex.c (do_identifier): Adjust.
(do_scoped_id): Adjust.
* parse.y (empty_parms): Adjust.
* class.c (push_lang_context): Adjust.
(pop_lang_context): Adjust.
* typeck.c (comp_target_parms): Adjust.
Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.325
diff -c -3 -p -r1.325 class.c
*** class.c 2000/07/11 17:31:21 1.325
--- class.c 2000/07/25 20:01:05
*************** push_lang_context (name)
*** 5690,5701 ****
if (name == lang_name_cplusplus)
{
- strict_prototype = strict_prototypes_lang_cplusplus;
current_lang_name = name;
}
else if (name == lang_name_java)
{
- strict_prototype = strict_prototypes_lang_cplusplus;
current_lang_name = name;
/* DECL_IGNORED_P is initially set for these types, to avoid clutter.
(See record_builtin_java_type in decl.c.) However, that causes
--- 5690,5699 ----
*************** push_lang_context (name)
*** 5712,5718 ****
}
else if (name == lang_name_c)
{
- strict_prototype = strict_prototypes_lang_c;
current_lang_name = name;
}
else
--- 5710,5715 ----
*************** pop_lang_context ()
*** 5728,5738 ****
to it. */
*current_lang_stack = NULL_TREE;
current_lang_name = *--current_lang_stack;
- if (current_lang_name == lang_name_cplusplus
- || current_lang_name == lang_name_java)
- strict_prototype = strict_prototypes_lang_cplusplus;
- else if (current_lang_name == lang_name_c)
- strict_prototype = strict_prototypes_lang_c;
}
/* Type instantiation routines. */
--- 5725,5730 ----
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.500
diff -c -3 -p -r1.500 cp-tree.h
*** cp-tree.h 2000/07/21 06:41:38 1.500
--- cp-tree.h 2000/07/25 20:01:08
*************** extern int flag_use_repository;
*** 1181,1190 ****
required. */
extern int flag_optional_diags;
- /* Nonzero means do not consider empty argument prototype to mean function
- takes no arguments. */
- extern int flag_strict_prototype;
-
/* Nonzero means output .vtable_{entry,inherit} for use in doing vtable gc. */
extern int flag_vtable_gc;
--- 1181,1186 ----
*************** typedef enum special_function_kind {
*** 3211,3221 ****
destroyed. */
sfk_conversion /* A conversion operator. */
} special_function_kind;
-
- /* Zero means prototype weakly, as in ANSI C (no args means nothing).
- Each language context defines how this variable should be set. */
- extern int strict_prototype;
- extern int strict_prototypes_lang_c, strict_prototypes_lang_cplusplus;
/* Non-zero means that if a label exists, and no other identifier
applies, use the value of the label. */
--- 3207,3212 ----
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.660
diff -c -3 -p -r1.660 decl.c
*** decl.c 2000/07/25 19:36:26 1.660
--- decl.c 2000/07/25 20:01:21
*************** maybe_push_to_top_level (pseudo)
*** 2588,2594 ****
VARRAY_TREE_INIT (current_lang_base, 10, "current_lang_base");
current_lang_stack = &VARRAY_TREE (current_lang_base, 0);
current_lang_name = lang_name_cplusplus;
- strict_prototype = strict_prototypes_lang_cplusplus;
current_namespace = global_namespace;
}
--- 2588,2593 ----
*************** pop_from_top_level ()
*** 2622,2632 ****
}
}
- if (current_lang_name == lang_name_cplusplus)
- strict_prototype = strict_prototypes_lang_cplusplus;
- else if (current_lang_name == lang_name_c)
- strict_prototype = strict_prototypes_lang_c;
-
/* If we were in the middle of compiling a function, restore our
state. */
if (s->need_pop_function_context)
--- 2621,2626 ----
*************** decls_match (newdecl, olddecl)
*** 3021,3042 ****
if (same_type_p (TREE_TYPE (f1), TREE_TYPE (f2)))
{
! if ((! strict_prototypes_lang_c || DECL_BUILT_IN (olddecl))
! && DECL_EXTERN_C_P (olddecl)
! && p2 == NULL_TREE)
{
types_match = self_promoting_args_p (p1);
if (p1 == void_list_node)
TREE_TYPE (newdecl) = TREE_TYPE (olddecl);
}
! else if (!strict_prototypes_lang_c
! && DECL_EXTERN_C_P (olddecl)
! && DECL_EXTERN_C_P (newdecl)
! && p1 == NULL_TREE)
{
types_match = self_promoting_args_p (p2);
TREE_TYPE (newdecl) = TREE_TYPE (olddecl);
}
else
types_match = compparms (p1, p2);
}
--- 3015,3045 ----
if (same_type_p (TREE_TYPE (f1), TREE_TYPE (f2)))
{
! if (p2 == NULL_TREE && DECL_EXTERN_C_P (olddecl)
! && (DECL_BUILT_IN (olddecl)
! #ifndef NO_IMPLICIT_EXTERN_C
! || (DECL_IN_SYSTEM_HEADER (newdecl) && !DECL_CLASS_SCOPE_P (newdecl))
! || (DECL_IN_SYSTEM_HEADER (olddecl) && !DECL_CLASS_SCOPE_P (olddecl))
! #endif
! ))
{
types_match = self_promoting_args_p (p1);
if (p1 == void_list_node)
TREE_TYPE (newdecl) = TREE_TYPE (olddecl);
}
! #ifndef NO_IMPLICIT_EXTERN_C
! else if (p1 == NULL_TREE
! && (DECL_EXTERN_C_P (olddecl)
! && DECL_IN_SYSTEM_HEADER (olddecl)
! && !DECL_CLASS_SCOPE_P (olddecl))
! && (DECL_EXTERN_C_P (newdecl)
! && DECL_IN_SYSTEM_HEADER (newdecl)
! && !DECL_CLASS_SCOPE_P (newdecl)))
{
types_match = self_promoting_args_p (p2);
TREE_TYPE (newdecl) = TREE_TYPE (olddecl);
}
+ #endif
else
types_match = compparms (p1, p2);
}
*************** init_decl_processing ()
*** 6287,6301 ****
current_lang_name = NULL_TREE;
/* Adjust various flags based on command-line settings. */
- if (flag_strict_prototype == 2)
- flag_strict_prototype = pedantic;
if (! flag_permissive && ! pedantic)
flag_pedantic_errors = 1;
if (!flag_no_inline)
flag_inline_trees = 1;
- strict_prototypes_lang_c = flag_strict_prototype;
-
/* Initially, C. */
current_lang_name = lang_name_c;
--- 6290,6300 ----
*************** destroy_local_var (decl)
*** 7986,7992 ****
If the length of an array type is not known before,
it must be determined now, from the initial value, or it is an error.
! INIT0 holds the value of an initializer that should be allowed to escape
the normal rules.
FLAGS is LOOKUP_ONLYCONVERTING if the = init syntax was used, else 0
--- 7985,7991 ----
If the length of an array type is not known before,
it must be determined now, from the initial value, or it is an error.
! INIT holds the value of an initializer that should be allowed to escape
the normal rules.
FLAGS is LOOKUP_ONLYCONVERTING if the = init syntax was used, else 0
*************** grokdeclarator (declarator, declspecs, d
*** 10678,10687 ****
if (TREE_CODE (declarator) == BIT_NOT_EXPR)
declarator = TREE_OPERAND (declarator, 0);
! if (strict_prototype == 0 && arg_types == NULL_TREE)
! arg_types = void_list_node;
! else if (arg_types == NULL_TREE
! || arg_types != void_list_node)
{
cp_error ("destructors may not have parameters");
arg_types = void_list_node;
--- 10677,10683 ----
if (TREE_CODE (declarator) == BIT_NOT_EXPR)
declarator = TREE_OPERAND (declarator, 0);
! if (arg_types != void_list_node)
{
cp_error ("destructors may not have parameters");
arg_types = void_list_node;
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.377
diff -c -3 -p -r1.377 decl2.c
*** decl2.c 2000/07/17 21:35:46 1.377
--- decl2.c 2000/07/25 20:01:24
*************** int warn_deprecated = 1;
*** 360,372 ****
#endif
int dollars_in_ident = DOLLARS_IN_IDENTIFIERS;
- /* Nonzero for -fno-strict-prototype switch: do not consider empty
- argument prototype to mean function takes no arguments. */
-
- int flag_strict_prototype = 2;
- int strict_prototype = 1;
- int strict_prototypes_lang_c, strict_prototypes_lang_cplusplus = 1;
-
/* Nonzero means that labels can be used as first-class objects */
int flag_labels_ok;
--- 360,365 ----
*************** lang_f_options[] =
*** 554,560 ****
{"rtti", &flag_rtti, 1},
{"squangle", &flag_do_squangling, 1},
{"stats", &flag_detailed_statistics, 1},
- {"strict-prototype", &flag_strict_prototype, 1},
{"use-cxa-atexit", &flag_use_cxa_atexit, 1},
{"vtable-gc", &flag_vtable_gc, 1},
{"vtable-thunks", &flag_vtable_thunks, 1},
--- 547,552 ----
*************** static const char * const unsupported_op
*** 571,576 ****
--- 563,569 ----
"guiding-decls",
"nonnull-objects",
"this-is-variable",
+ "strict-prototype",
};
/* Compare two option strings, pointed two by P1 and P2, for use with
Index: cp/lex.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/lex.c,v
retrieving revision 1.209
diff -c -3 -p -r1.209 lex.c
*** lex.c 2000/06/30 18:20:38 1.209
--- lex.c 2000/07/25 20:01:26
*************** do_identifier (token, parsing, args)
*** 3114,3132 ****
cp_error ("`%D' not defined", token);
id = error_mark_node;
}
- else if (in_call && ! flag_strict_prototype)
- {
- if (!id)
- id = implicitly_declare (token);
- else
- {
- /* Implicit declaration of built-in function. Don't
- change the built-in declaration, but don't let this
- go by silently, either. */
- cp_pedwarn ("implicit declaration of function `%D'", token);
- DECL_ANTICIPATED (id) = 0; /* only issue this warning once */
- }
- }
else if (current_function_decl == 0)
{
cp_error ("`%D' was not declared in this scope", token);
--- 3114,3119 ----
*************** do_scoped_id (token, parsing)
*** 3255,3272 ****
id = build_min_nt (LOOKUP_EXPR, token);
LOOKUP_EXPR_GLOBAL (id) = 1;
return id;
- }
- if (parsing && (yychar == '(' || yychar == LEFT_RIGHT)
- && ! flag_strict_prototype)
- id = implicitly_declare (token);
- else
- {
- if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node)
- cp_error ("`::%D' undeclared (first use here)", token);
- id = error_mark_node;
- /* Prevent repeated error messages. */
- SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);
}
}
else
{
--- 3242,3253 ----
id = build_min_nt (LOOKUP_EXPR, token);
LOOKUP_EXPR_GLOBAL (id) = 1;
return id;
}
+ if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node)
+ cp_error ("`::%D' undeclared (first use here)", token);
+ id = error_mark_node;
+ /* Prevent repeated error messages. */
+ SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);
}
else
{
Index: cp/parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/parse.y,v
retrieving revision 1.184
diff -c -3 -p -r1.184 parse.y
*** parse.y 2000/07/10 07:16:23 1.184
--- parse.y 2000/07/25 20:01:27
*************** empty_parms ()
*** 101,111 ****
{
tree parms;
! if (strict_prototype
! || current_class_type != NULL)
! parms = void_list_node;
! else
parms = NULL_TREE;
return parms;
}
--- 101,112 ----
{
tree parms;
! #ifndef NO_IMPLICIT_EXTERN_C
! if (in_system_header && current_class_type == NULL)
parms = NULL_TREE;
+ else
+ #endif
+ parms = void_list_node;
return parms;
}
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck.c,v
retrieving revision 1.299
diff -c -3 -p -r1.299 typeck.c
*** typeck.c 2000/07/18 10:51:46 1.299
--- typeck.c 2000/07/25 20:01:30
*************** comp_target_parms (parms1, parms2)
*** 1484,1496 ****
if (t1 == 0 && t2 != 0)
{
! if (! flag_strict_prototype && t2 == void_list_node)
! /* t1 might be the arglist of a function pointer in extern "C"
! declared to take (), which we fudged to (...). Don't make the
! user pay for our mistake. */;
! else
! cp_pedwarn ("ISO C++ prohibits conversion from `%#T' to `(...)'",
! parms2);
return self_promoting_args_p (t2);
}
if (t2 == 0)
--- 1484,1491 ----
if (t1 == 0 && t2 != 0)
{
! cp_pedwarn ("ISO C++ prohibits conversion from `%#T' to `(...)'",
! parms2);
return self_promoting_args_p (t2);
}
if (t2 == 0)
2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
* invoke.texi (strict-prototypes): Remove.
* extend.texi (Deprecated Features): Add strict-prototypes.
(Backwards Compatibility): New node.
Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/invoke.texi,v
retrieving revision 1.204
diff -c -3 -p -r1.204 invoke.texi
*** invoke.texi 2000/07/24 16:39:45 1.204
--- invoke.texi 2000/07/25 19:57:04
*************** in the following sections.
*** 111,117 ****
-fhuge-objects -fno-implicit-templates -finit-priority
-fno-implement-inlines -fname-mangling-version-@var{n}
-fno-default-inline -fno-operator-names -fno-optional-diags -fpermissive
! -frepo -fstrict-prototype -fsquangle -ftemplate-depth-@var{n}
-fuse-cxa-atexit -fvtable-thunks -nostdinc++ -Wctor-dtor-privacy
-Wno-deprecated -Weffc++ -Wno-non-template-friend -Wnon-virtual-dtor
-Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wreorder
--- 111,117 ----
-fhuge-objects -fno-implicit-templates -finit-priority
-fno-implement-inlines -fname-mangling-version-@var{n}
-fno-default-inline -fno-operator-names -fno-optional-diags -fpermissive
! -frepo -fsquangle -ftemplate-depth-@var{n}
-fuse-cxa-atexit -fvtable-thunks -nostdinc++ -Wctor-dtor-privacy
-Wno-deprecated -Weffc++ -Wno-non-template-friend -Wnon-virtual-dtor
-Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wreorder
*************** functions for use by the C++ runtime typ
*** 1208,1226 ****
of the language, you can save some space by using this flag. Note that
exception handling uses the same information, but it will generate it as
needed.
-
- @item -fstrict-prototype
- Within an @samp{extern "C"} linkage specification, treat a function
- declaration with no arguments, such as @samp{int foo ();}, as declaring
- the function to take no arguments. Normally, such a declaration means
- that the function @code{foo} can take any combination of arguments, as
- in C. @samp{-pedantic} implies @samp{-fstrict-prototype} unless
- overridden with @samp{-fno-strict-prototype}.
-
- Specifying this option will also suppress implicit declarations of
- functions.
-
- This flag no longer affects declarations with C++ linkage.
@item -fsquangle
@itemx -fno-squangle
--- 1208,1213 ----
Index: extend.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/extend.texi,v
retrieving revision 1.56
diff -c -3 -p -r1.56 extend.texi
*** extend.texi 2000/07/18 00:23:50 1.56
--- extend.texi 2000/07/25 19:57:05
*************** C++ Language}, for extensions that apply
*** 66,71 ****
--- 66,72 ----
* Return Address:: Getting the return or frame address of a function.
* Other Builtins:: Other built-in functions.
* Deprecated Features:: Things might disappear from g++.
+ * Backwards Compatibility:: Compatibilities with earlier definitions of C++.
@end menu
@end ifset
@ifclear INTERNALS
*************** C++ Language}, for extensions that apply
*** 114,119 ****
--- 115,121 ----
function.
* Return Address:: Getting the return or frame address of a function.
* Deprecated Features:: Things might disappear from g++.
+ * Backwards Compatibility:: Compatibilities with earlier definitions of C++.
* Other Builtins:: Other built-in functions.
@end menu
@end ifclear
*************** defines how template definitions have to
*** 3292,3297 ****
--- 3294,3335 ----
implementation units. g++ has an implicit instantiation mechanism that
should work just fine for standard-conforming code.
+ @item -fstrict-prototype
+ @itemx -fno-strict-prototype
+ Previously it was possible to use an empty prototype parameter list to
+ indicate an unspecified number of parameters (like C), rather than no
+ parameters, as C++ demands. This feature has been removed, except where
+ it is required for backwards compatibility @xref{Backwards Compatibility}
+
+ @end table
+
+ @node Backwards Compatibility
+ @section Backwards Compatibility
+ @cindex Backwards Compatibility
+ @cindex ARM
+
+ Now that there is a definitive ISO standard C++, g++ has a specification
+ to adhere to. The C++ language evolved over time, and features that used
+ to be acceptable in previous drafts of the standard, such as the ARM, are
+ no longer accepted. In order to allow compilation of C++ written to such
+ drafts, g++ contains some backwards compatibilities. @emph{All such
+ backwards compatibility features are liable to disappear in future
+ versions of g++.} They should be considered deprecated @xref{Deprecated
+ Features}.
+
+ @table @code
+ @item For scope
+ If a variable is declared at for scope, it used to remain in scope until
+ the end of the scope which contained the for statement (rather than just
+ within the for scope). g++ retains this, but issues a warning, if such a
+ variable is accessed outside the for scope.
+
+ @item implicit C language
+ Old C system header files did not contain an @code{extern "C" @{...@}}
+ scope to set the language. On such systems, all header files are
+ implicitly scoped inside a C language scope. Also, an empty prototype
+ @code{()} will be treated as an unspecified number of arguments, rather
+ than no arguments, as C++ demands.
@end table
@node C++ Extensions
2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.ext/implicit1.C: Remove.
* g++.old-deja/g++.jason/c2.C: Remove
* g++.old-deja/g++.mike/p700.C: Add prototype parameters.
* g++.old-deja/g++.pt/crash16.C: Likewise.
* g++.old-deja/g++.brendan/crash43.C: Remove -fstrict-prototype.
Index: testsuite/g++.old-deja/g++.brendan/crash43.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.brendan/crash43.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 crash43.C
*** crash43.C 1998/12/16 21:23:56 1.2
--- crash43.C 2000/07/25 20:10:20
***************
*** 1,5 ****
// Build don't link:
! // Special g++ Options: -g -fno-strict-prototype
// GROUPS passed old-abort
// excess errors test - XFAIL sparc64-*-elf
extern "C" { typedef int jmp_buf[12]; }
--- 1,5 ----
// Build don't link:
! // Special g++ Options: -g
// GROUPS passed old-abort
// excess errors test - XFAIL sparc64-*-elf
extern "C" { typedef int jmp_buf[12]; }
Index: testsuite/g++.old-deja/g++.ext/implicit1.C
===================================================================
RCS file: implicit1.C
diff -N implicit1.C
*** /sourceware/cvs-tmp/cvsvSpCIe Tue Jul 25 13:10:22 2000
--- /dev/null Tue May 5 13:32:27 1998
***************
*** 1,14 ****
- // test for implicit declaration
- // Special g++ Options: -w -fpermissive
-
- int
- main ()
- {
- return blarg ();
- }
-
- extern "C" int
- blarg (...)
- {
- return 0;
- }
--- 0 ----
Index: testsuite/g++.old-deja/g++.jason/c2.C
===================================================================
RCS file: c2.C
diff -N c2.C
*** /sourceware/cvs-tmp/cvso9ood4 Tue Jul 25 13:10:22 2000
--- /dev/null Tue May 5 13:32:27 1998
***************
*** 1,18 ****
- // PRMS Id: 3134
- // g++ understands C redeclaration semantics. Sun CC 2.0.1 doesn't.
- // Special g++ Options:
- // Build don't link:
-
- extern "C" {
- int foo();
- int foo(int);
-
- int bar(int);
- int bar();
- }
-
- main()
- {
- foo (1);
- bar (1);
- }
--- 0 ----
Index: testsuite/g++.old-deja/g++.mike/p700.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.mike/p700.C,v
retrieving revision 1.3
diff -c -3 -p -r1.3 p700.C
*** p700.C 2000/01/04 15:52:23 1.3
--- p700.C 2000/07/25 20:10:21
*************** extern struct _iobuf *c_proto_fdopen ()
*** 1514,1522 ****
extern struct _iobuf *c_proto_freopen ();
extern struct _iobuf *c_proto_popen ();
extern struct _iobuf *tmpfile();
! extern long ftell();
! extern char *fgets();
! extern char *gets();
extern char *c_proto_sprintf ();
extern char *ctermid();
extern char *cuserid();
--- 1514,1522 ----
extern struct _iobuf *c_proto_freopen ();
extern struct _iobuf *c_proto_popen ();
extern struct _iobuf *tmpfile();
! extern long ftell(_iobuf *);
! extern char *fgets(char *, int, _iobuf *);
! extern char *gets(char *);
extern char *c_proto_sprintf ();
extern char *ctermid();
extern char *cuserid();
*************** struct tm {
*** 1820,1826 ****
extern struct tm *c_proto_gmtime (), *c_proto_localtime ();
extern char *c_proto_asctime (), *c_proto_ctime ();
extern void c_proto_tzset (), c_proto_tzsetwall ();
! extern int dysize();
extern time_t timelocal(), timegm();
--- 1820,1826 ----
extern struct tm *c_proto_gmtime (), *c_proto_localtime ();
extern char *c_proto_asctime (), *c_proto_ctime ();
extern void c_proto_tzset (), c_proto_tzsetwall ();
! extern int dysize(int);
extern time_t timelocal(), timegm();
*************** struct tms {
*** 1945,1951 ****
};
! clock_t times( );
--- 1945,1951 ----
};
! clock_t times(tms * );
Index: testsuite/g++.old-deja/g++.pt/crash16.C
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/g++.old-deja/g++.pt/crash16.C,v
retrieving revision 1.2
diff -c -3 -p -r1.2 crash16.C
*** crash16.C 1998/12/16 21:54:13 1.2
--- crash16.C 2000/07/25 20:10:21
***************
*** 1,7 ****
// Build don't link:
// Special g++ Options:
! extern "C" void qsort();
struct R {
int count;
--- 1,8 ----
// Build don't link:
// Special g++ Options:
! extern "C" void qsort(void *base, __SIZE_TYPE__ nmemb, __SIZE_TYPE__ size,
! int (*compar)(const void *, const void *));
struct R {
int count;