Commit Graph

147 Commits

Author SHA1 Message Date
Mark Mitchell
ae499ccea4 Move statement-tree facilities from C++ to C front-end.
* c-common.h (c_tree_index): Add CTI_VOID_ZERO.
	(void_zero_node): New macro.
	(struct stmt_tree_s): New type.
	(stmt_tree): New typedef.
	(struct language_function): New type.
	(last_tree): New macro.
	(last_expr_type): Likewise.
	(walk_tree_fn): New typedef.
	(current_stmt_tree): New function.
	(begin_stmt_tree): Likewise.
	(add_stmt): Likewise.
	(finish_stmt_tree): Likewise.
	(statement_code_p): Likewise.
	(lang_statement_code_p): New variable.
	(walk_stmt_tree): New function.
	(STMT_IS_FULL_EXPR_P): New macro.
	* c-common.c (lang_statement_code_p): New variable.
	(c_common_nodes_and_builtins): Initialize void_zero_node.
	(statement_code_p): New function.
	(walk_stmt_tree): Likewise.
	* c-decl.c (language_function): Rename to ...
	(c_language_function): ... this.  Include language_function.
	(push_c_function_context): Adjust accordingly.
	(pop_c_function_context): Likewise.
	(mark_c_function_context): Likewise.
	(current_stmt_tree): Define.
	* c-semantics.c (begin_stmt_tree): New function.
	(add_stmt): Likewise.
	(prune_unused_decls): Likewise.
	(finish_stmt_tree): Likewise.

	Move statement-tree facilities from C++ to C front-end.
	* cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
	(void_zero_node): Remove.
	(stmt_tree): Likewise.
	(scope_chain): Adjust.
	(language_function): Rename to cp_language_function.
	(cp_function_chain): Adjust.
	(current_stmt_tree): Remove.
	(last_tree): Likewise.
	(last_expr_type): Likewise.
	(struct lang_decl): Adjust.
	(STMT_IS_FULL_EXPR_P): Remove.
	(add_tree): Remove.
	(begin_stmt_tree): Likewise.
	(finish_stmt_tree): Likewise.
	(walk_tree_fn): Likewise.
	(walk_stmt_tree): Likewise.
	* class.c (finish_struct): Replace use of add_tree with add_stmt.
	* decl.c (mark_stmt_tree): Adjust type.
	(init_decl_processing): Don't build void_zero_node.
	(initialize_local_var): Adjust usage of current_stmt_tree.
	(finish_enum): Use add_stmt, not add_tree.
	(save_function_data): Adjust use of language_function.
	(finish_constructor_body): Use add_stmt, not add_tree.
	(finish_destructor_body): Likewise.
	(push_cp_function_context): Adjust use of language_function.
	(pop_cp_function_context): Likewise.
	(mark_lang_function): Likewise.
	(mark_cp_function_context): Likewise.
	* init.c (build_aggr_init): Adjust use of current_stmt_tree.
	(build_vec_init): Likewise.
	* semantics.c (SET_LAST_STMT): Remove.
	(RECHAIN_STMTS): Don't use it.
	(stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
	(current_stmt_tree): Define.
	(add_tree): Remove.
	(finish_goto_stmt): Use add_stmt, not add_tree.
	(finish_expr_stmt): Likewise.
	(begin_if_stmt): Likewise.
	(finish_then_clause): Likewise.
	(begin_while_stmt): Likewise.
	(begin_do_stmt): Likewise.
	(finish_return_stmt): Likewise.
	(begin_for_stmt): Likewise.
	(finish_break_stmt): Likewise.
	(finish_continue_stmt): Likewise.
	(begin_switch_stmt): Likewise.
	(finish_case_label): Likewise.
	(begin_try_block): Likewise.
	(begin_function_try_block): Likewise.
	(begin_handler): Likewise.
	(begin_catch_block): Likewise.
	(begin_compound_stmt): Likewise.
	(begin_asm_stmt): Likewise.
	(finish_asm_stmt): Likewise.
	(finish_label_stmt): Likewise.
	(add_decl_stmt): Likewise.
	(finish_subobject): Likewise.
	(finish_decl_cleanup): Likewise.
	(finish_named_return_value): Likewise.
	(setup_vtbl_ptr): Likewise.
	(add_scope_stmt): Likewise.
	(finish_stmt_expr): Likewise.
	(prune_unused_decls): Remove.
	(begin_stmt_tree): Likewise.
	(finish_stmt_tree): Likewise.
	(prep_stmt): Adjust use of current_stmt_tree.
	(lang_expand_stmt): Likewise.
	* tree.c (statement_code_p): Remove.
	(cp_statement_code_p): New function.
	(walk_stmt_tree): Remove.
	(init_tree): Set lang_statement_code_p.

From-SVN: r36221
2000-09-07 01:36:11 +00:00
Gabriel Dos Reis
f5c979243f editbuf.h (edit_streambuf): Fix syntax error in friend-declaration.
* editbuf.h (edit_streambuf): Fix syntax error in
	friend-declaration.

From-SVN: r35782
2000-08-18 10:20:52 +00:00
Zack Weinberg
57119aa9eb top level:
* configure: Make enable_threads and enable_shared defaults
	explicit.  Substitute enable_threads into generated Makefiles.
	* configure.in: Accept *-*-linux* not just *-*-linux-gnu*.
	* libtool.m4: Accept *-*-linux* not just *-*-linux-gnu*.
gcc:
	* configure.in: Accept *-*-linux* not just *-*-linux-gnu*.
	* fixinc/inclhack.def: Likewise.
	* fixinc/mkfixinc.sh: Likewise.
	* configure: Regenerate.
	* fixinc/fixincl.x: Regenerate.
	* install.texi: Document equivalence of linux and linux-gnu.
libio:
	* configure.in: Accept *-*-linux* not just *-*-linux-gnu*.
	Honor --disable-threads.
libstdc++:
	* configure.in: Accept *-*-linux* not just *-*-linux-gnu*.
	Honor --disable-threads.
libstdc++-v3:
	* configure: Regenerate after change to ../libtool.m4.
libobjc:
	* configure: Regenerate after change to ../libtool.m4.

From-SVN: r35680
2000-08-14 18:08:46 +00:00
Krister Walfridsson
317770266d * gen-params: Added trailing space for 'long long int' regexp.
From-SVN: r35200
2000-07-23 10:15:42 -06:00
Alex Samuel
bece74bdee in libiberty/ChangeLog:
* cp-demangle.c (demangle_encoding): Accept no substitutions.
	(demangle_name): Handle <substitution> followed by
	<unqualified-template-name>.
	(demangle_type): Follow special substitutions with
	<class-enum-type>
	(demangle_subtitution): Set template_p for special substitutions.
	(main): Fix typos.

in gcc/cp/ChangeLog:

	* mangle.c (find_substitution): Use same_type_p.
	(write_encoding): Don't check for substitutions.

in libio/ChangeLog:

	* libioP.h (VTABLE_LABEL): Update for new vtable mangling.
	* stdstrbufs.cc (filebuf_vtable): Likewise.
	(stdiobuf_vtable): Likewise.

From-SVN: r34811
2000-06-30 15:25:33 +00:00
Mark Mitchell
d2103f699c Revert previous patch
From-SVN: r34482
2000-06-10 03:02:21 +00:00
Mark Mitchell
16b72afedd libioP.h: Remove old ABI mangling code.
* libioP.h: Remove old ABI mangling code.
	* stdstrbufs.cc: Likewise.

From-SVN: r34459
2000-06-08 17:35:44 +00:00
Mark Mitchell
f557989836 libioP.h: Handle new ABI mangling.
* libioP.h: Handle new ABI mangling.
	* stdstrbufs.cc: Likewise.

From-SVN: r34395
2000-06-04 21:16:04 +00:00
Ulrich Drepper
4dd35855be Update.
From-SVN: r34129
2000-05-24 07:06:31 +00:00
Ulrich Drepper
d027507ed8 (endl): Fix bug in last change.
(ends): Make same change as for endl.

From-SVN: r34128
2000-05-24 07:06:07 +00:00
Jeff Law
db9aed0ed6 iostream.cc (endl): Verify stream can accept characters before writing its eol.
* iostream.cc (endl): Verify stream can accept characters
        before writing its eol.

From-SVN: r34122
2000-05-23 22:57:22 -06:00
Zack Weinberg
7b8442983d bcp-1.c: Replace abort in arg of __builtin_constant_p with a generic external function.
gcc/testsuite:
	* c-torture/execute/bcp-1.c: Replace abort in arg of
	__builtin_constant_p with a generic external function.

	* gcc.dg/20000108-1.c, gcc.dg/980211-1.c, gcc.dg/980414-1.c,
	gcc.dg/990119-1.c, gcc.dg/990409.c, gcc.dg/990424-1.c,
	gcc.dg/991230-1.c, gcc.dg/clobbers.c, gcc.dg/lineno.c,
	gcc.dg/noreturn-1.c, gcc.dg/trigraphs.c, gcc.dg/uninit-4.c:
	Prototype abort and/or exit.

	* gcc.dg/990407-1.c, gcc.dg/strpaste.c,
	gcc.dg/special/alias-1.c, gcc.dg/special/gcsec-1.c,
	gcc.dg/special/weak-1.c, gcc.dg/special/weak-2.c,
	gcc.dg/special/wkali-1.c, gcc.dg/special/wkali-2.c: Include stdlib.h.

libio/tests:
	* tfformat.c: Include stdlib.h.

From-SVN: r34110
2000-05-23 19:30:44 +00:00
David Edelsohn
63b8af0cca config.shared: Change "pic" to depend on $(PICFLAG), not on $(enable_shared).
* config.shared: Change "pic" to depend on $(PICFLAG), not
        on $(enable_shared).

From-SVN: r33920
2000-05-15 22:53:47 -04:00
Robert Lipe
c35db29361 configure.in: Remove special casing for sco3.2v[45].
2000-05-11  Robert Lipe <robertlipe@usa.net>

        * configure.in: Remove special casing for sco3.2v[45].
        * config/sco4.mt: Deleted.

From-SVN: r33864
2000-05-11 21:34:11 +00:00
Jakub Jelinek
36348eab5d config.table: Use mh-sparcpic for sparc*-*-*.
* config.table: Use mh-sparcpic for sparc*-*-*.

	* configure.in: Use mh-sparcpic for sparc*-*-*.

From-SVN: r33848
2000-05-11 16:16:25 +02:00
Zack Weinberg
5729663d29 * configure.in: Indent the # of #include_next one space.
From-SVN: r32871
2000-04-02 22:51:55 +00:00
Jason Merrill
ad242caf80 * configure.in: -linux-gnu*, not -linux-gnu.
From-SVN: r32823
2000-03-29 21:11:39 -05:00
Martin v. Löwis
dfe50efb43 fstream.h (ifstream::ifstream): Add ios::in to mode.
* fstream.h (ifstream::ifstream): Add ios::in to mode.
	(ifstream::open): Likewise.
	(ofstream::ofstream): Add ios::out to mode.
	(ofstream::open): Likewise.

From-SVN: r31666
2000-01-28 09:55:33 +00:00
Zack Weinberg
d14cfa2af8 dbz.c, dbzmain.c: Include stdlib.h.
* dbz/dbz.c, dbz/dbzmain.c: Include stdlib.h.  Don't declare
	malloc, calloc, free, atol, atoi, or errno.  (errno.h was
	already being included.)

From-SVN: r31659
2000-01-28 01:21:49 +00:00
Fred Fish
24618f4902 configure.in (*-*-beos*): Recognize.
* configure.in (*-*-beos*): Recognize.
        * config/beos.mt: New file.

From-SVN: r31374
2000-01-12 20:37:57 -05:00
Jakub Jelinek
bf3f1a7161 libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of _IO_fpos_t.
* libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of
	_IO_fpos_t.
	(_IO_seekoff, _IO_seekpos): Likewise. Use _IO_off64_t instead of
	_IO_fpos64_t.
	* libioP.h (_IO_seekoff_t, _IO_seekpos_t, _IO_seek_t): Likewise.
	(_IO_seekoff, _IO_seekpos): Likewise.
	(_IO_default_seekoff, _IO_default_seekpos): Likewise.
	(_IO_default_seek): Likewise.
	(_IO_file_seekoff, _IO_file_seek, _IO_str_seekoff): Likewise.
	* streambuf.h (streampos): Typedef to _IO_off_t resp. _IO_off64_t.
	* parsestream.h (class parsebuf::pos_at_line_start): Change type
	to _IO_off_t.

From-SVN: r31068
1999-12-22 10:01:59 +01:00
Martin v. Löwis
2c7af0d7f4 Add commentary:Remove seek for ios::app if not.
From-SVN: r31059
1999-12-21 18:14:50 +00:00
Martin v. Löwis
dec0fa945c * filebuf.cc (open): Support ios::ate if _G_HAVE_IO_FILE_OPEN.
From-SVN: r31057
1999-12-21 18:10:24 +00:00
Jason Merrill
3eea0202cd filedoalloc.c, [...]: Remove advertising clause from BSD license, pursuant with
* filedoalloc.c, floatio.h, iovfprintf.c, iovfscanf.c: Remove
        advertising clause from BSD license, pursuant with

          ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

From-SVN: r30947
1999-12-15 04:13:06 -05:00
Martin v. Löwis
705e873389 strstream.h (strstreambuf::streambuf): Rename parameters to avoid shadow warning.
* strstream.h (strstreambuf::streambuf): Rename parameters to
	avoid shadow warning.
	* stream.h (WS): Likewise.

From-SVN: r30941
1999-12-15 07:46:36 +00:00
Jeffrey A Law
2fa18a53bb * editbuf.cc, parsestream.cc, pfstream.cc: Include string.h.
From-SVN: r29725
1999-09-30 01:10:07 -06:00
Ulrich Drepper
e5da599a0c configure.in: Recognize target *vxworks* and add fragment vxworks.mt.
* configure.in: Recognize target *vxworks* and add fragment vxworks.mt.
        * config/vxworks.mt: New file.
        * gen-params: Let configure override HAVE_PRINTF_FP.

From-SVN: r29679
1999-09-27 11:39:43 -06:00
Jeff Law
40d0e0df0a Kill RCSid strings.
From-SVN: r29678
1999-09-27 11:36:14 -06:00
Mark Klein
6e47d69e32 * config/mpeix.mt: New for MPEiX port.
From-SVN: r29374
1999-09-13 06:30:08 -06:00
Mark Klein
a27995df2b * configure.in: Add mpeix.mt make fragment.
From-SVN: r29202
1999-09-08 02:40:16 -06:00
Jeff Law
e3de40e4c2 dummy checkin to prevent merge lossage
From-SVN: r29102
1999-09-04 09:09:22 -06:00
Alexandre Oliva
aee941f2bb streambuf.h (ios::streamsize): Declare as _IO_ssize_t, as in the global scope.
* streambuf.h (ios::streamsize): Declare as _IO_ssize_t, as in the
global scope.

From-SVN: r28604
1999-08-09 00:07:09 +00:00
Andreas Schwab
ff76d1ee86 iostream.cc: Add missing calls to isfx and setup a cleanup region for the locked stream.
* iostream.cc: Add missing calls to isfx and setup a cleanup
	region for the locked stream.
	* iostream.h: Likewise.
	* isgetline.cc: Likewise.
	* isgetsb.cc: Likewise.
	* isscan.cc: Likewise.

From-SVN: r28573
1999-08-07 00:02:05 -06:00
Hans-Peter Nilsson
5c2a352dcf configure.in (post-target): Use "$(topsrcdir)", not "$(srcdir)/..".
8
	* configure.in (post-target): Use "$(topsrcdir)", not "$(srcdir)/..".

From-SVN: r27836
1999-06-28 20:32:02 -06:00
Mark Mitchell
25e1e04927 libio.exp (test_libio): Use additional_flags, not additional_options.
* lib/libio.exp (test_libio): Use additional_flags, not
	additional_options.

From-SVN: r27716
1999-06-23 12:10:00 +00:00
Eric Raskin
a310f94892 * configure.in: Added DG/UX target fragment
From-SVN: r27294
1999-06-01 17:25:17 -06:00
Eric Raskin
95e888e677 * libio/dgux.mt: New file for DG/UX configuration of libio
From-SVN: r27248
1999-05-30 07:25:28 -06:00
Jeff Law
6de94858b9 libchill, libf2c, libobjc:
* configure.in (AC_PREREQ): Update to 2.13.
        (AC_EXEEXT): Call to find possible file extension.
        (compiler_name): Use.
        * configure: Regenerate.
libio, libstdc++
        * configure.in: Test for ${compiler_name}.exe as well.

From-SVN: r27050
1999-05-19 20:27:28 -06:00
Mark Kettenis
74c1118e9e * libioP.h: Only include libc-lock.h if _IO_MTSAFE_IO is defined.
From-SVN: r26980
1999-05-17 16:58:56 -06:00
Jason Merrill
d960c105fc configure.in (compiler_name): Don't do the skip-this-dir thing if we're reconfiguring.
* configure.in (compiler_name): Don't do the skip-this-dir thing
	if we're reconfiguring.

From-SVN: r26899
1999-05-12 04:39:23 -04:00
Nathan Sidwell
9939c435d2 * streambuf.h (ios::~ios): Use operator delete[] to remove _arrays.
From-SVN: r26691
1999-04-29 08:32:13 +00:00
Alexandre Oliva
ceff9b1445 Fixed some old ChangeLog entries I wrote before becoming aware of the GNU
coding standards.

From-SVN: r26679
1999-04-27 13:27:29 +00:00
Mumit Khan
edcc5d3c96 filedoalloc.c (_POSIX_SOURCE): Remove definition.
* filedoalloc.c (_POSIX_SOURCE): Remove definition.
        * fileops.c (_POSIX_SOURCE): Likewise.
        * iopopen.c (_POSIX_SOURCE): Likewise.
        * procbuf.cc (_POSIX_SOURCE): Likewise.
        * libioP.h (_POSIX_SOURCE): And define it here.
        * stdiostream.cc: Include libioP.h before others.

From-SVN: r26380
1999-04-12 12:27:53 -06:00
Geoffrey Noer
8df1d91ab8 * configure.in: Check cygwin*, not cygwin32*.
From-SVN: r26235
1999-04-06 21:27:25 -06:00
H.J. Lu
88101ab976 configure (gxx_include_dir): Removed.
* configure (gxx_include_dir): Removed.
	* configure.in (gxx_include_dir): Handle it.
	* Makefile.in: Likewise.
	* libio/configure.in (gxx_include_dir): Handle it.
	* libio/Makefile.in: Likewise.
	* libstdc++/configure.in (gxx_include_dir): Handle it.
	* libstdc++/Makefile.in: Likewise.

From-SVN: r26126
1999-04-02 07:17:49 -07:00
Mumit Khan
763ecbbc61 configure.in (EXEEXT): Define.
0
        * configure.in (EXEEXT): Define.
        (compiler_name): Use.

From-SVN: r25950
1999-03-24 14:44:23 -07:00
Mumit Khan
adbfd1de80 configure.in (EXEEXT): Define.
8
        * configure.in (EXEEXT): Define.
        (compiler_name): Use.

From-SVN: r25949
1999-03-24 14:44:22 -07:00
Alexandre Oliva
b48afaf700 * gen-params (CONFIG_NM): test ... -o ... is not portable
From-SVN: r25935
1999-03-23 23:58:21 +00:00
Franz Sirl
f24ab9a140 configure.in: Cleanup and add mh-*pic handling for arm, powerpc
Thu Mar 11 01:07:55 1999  Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
        * configure.in: Cleanup and add mh-*pic handling for arm, powerpc

From-SVN: r25690
1999-03-10 17:10:48 -07:00
H.J. Lu
f10a4de1a5 linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL.
* config/linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO
	-D_G_HAVE_WEAK_SYMBOL.
	* genops.c: Add the proper weak alias if _G_STDIO_USES_LIBIO
	and _G_HAVE_WEAK_SYMBOL are defined.
	* iofclose.c: Likewise.
	* iofeof.c: Likewise.
	* ioferror.c: Likewise.
	* iogetc.c: Likewise.
	* ioputc.c: Likewise.
	* iovsprintf.c: Likewise.
	* iovsscanf.c: Likewise.

From-SVN: r25590
1999-03-04 17:19:16 -07:00