gcc/libio
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
..
config configure.in: Remove special casing for sco3.2v[45]. 2000-05-11 21:34:11 +00:00
dbz dbz.c, dbzmain.c: Include stdlib.h. 2000-01-28 01:21:49 +00:00
include Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
stdio configure.in, [...]: Update with yesterday's toplevel configure.in changes. 1998-01-28 02:30:03 -07:00
tests bcp-1.c: Replace abort in arg of __builtin_constant_p with a generic external function. 2000-05-23 19:30:44 +00:00
testsuite libio.exp (test_libio): Use additional_flags, not additional_options. 1999-06-23 12:10:00 +00:00
ChangeLog editbuf.h (edit_streambuf): Fix syntax error in friend-declaration. 2000-08-18 10:20:52 +00:00
Makefile.in configure (gxx_include_dir): Removed. 1999-04-02 07:17:49 -07:00
NEWS release branch changes from 11-27 snapshot to egcs-1.0. 1997-12-05 15:13:17 -07:00
PlotFile.cc
PlotFile.h
README
SFile.cc
SFile.h
builtinbuf.cc
builtinbuf.h typo typo fixes fixes 1998-05-06 15:09:07 -06:00
cleanup.c Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
config.shared config.shared: Change "pic" to depend on $(PICFLAG), not on $(enable_shared). 2000-05-15 22:53:47 -04:00
configure.in top level: 2000-08-14 18:08:46 +00:00
depend config.shared (depend.new): delete libc-lock.h from dependencies, and fix _G_config.h -> $(_G_CONFIG_H) rule 1998-10-12 09:28:02 +00:00
editbuf.cc * editbuf.cc, parsestream.cc, pfstream.cc: Include string.h. 1999-09-30 01:10:07 -06:00
editbuf.h Move statement-tree facilities from C++ to C front-end. 2000-09-07 01:36:11 +00:00
filebuf.cc * filebuf.cc (open): Support ios::ate if _G_HAVE_IO_FILE_OPEN. 1999-12-21 18:10:24 +00:00
filedoalloc.c filedoalloc.c, [...]: Remove advertising clause from BSD license, pursuant with 1999-12-15 04:13:06 -05:00
fileops.c filedoalloc.c (_POSIX_SOURCE): Remove definition. 1999-04-12 12:27:53 -06:00
floatconv.c
floatio.h filedoalloc.c, [...]: Remove advertising clause from BSD license, pursuant with 1999-12-15 04:13:06 -05:00
fstream.cc
fstream.h fstream.h (ifstream::ifstream): Add ios::in to mode. 2000-01-28 09:55:33 +00:00
gen-params * gen-params: Added trailing space for 'long long int' regexp. 2000-07-23 10:15:42 -06:00
genops.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
indstream.cc
indstream.h
ioassign.cc
ioextend.cc
iofclose.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
iofdopen.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofeof.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
ioferror.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
iofflush.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofflush_u.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofgetpos.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofgets.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofopen.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofprintf.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofputs.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofread.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofscanf.c
iofsetpos.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
ioftell.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iofwrite.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iogetc.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
iogetdelim.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iogetline.c (_IO_getline_info): Don't read anything for N==0. 1998-08-25 14:39:39 +00:00
iogets.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
ioignore.c Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
iolibio.h Changes for _G_IO_IO_FILE_VERSION == 0x20001: 1998-02-24 13:09:55 -07:00
iomanip.cc
iomanip.h iomanip.h: Use __extension__ for `extern' explicit template instantiations. 1998-08-23 12:47:24 +00:00
iopadn.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
ioperror.c Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
iopopen.c filedoalloc.c (_POSIX_SOURCE): Remove definition. 1999-04-12 12:27:53 -06:00
ioprims.c fileops.c: #include <unistd.h>. 1998-02-12 16:56:20 -07:00
ioprintf.c
ioputc.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
ioputs.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
ioscanf.c
ioseekoff.c Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
ioseekpos.c Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
iosetbuffer.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iosetvbuf.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iosprintf.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iosscanf.c
iostdio.h
iostream.cc (endl): Fix bug in last change. 2000-05-24 07:06:07 +00:00
iostream.h iostream.cc: Add missing calls to isfx and setup a cleanup region for the locked stream. 1999-08-07 00:02:05 -06:00
iostream.texi typo typo fixes fixes 1998-05-06 15:09:07 -06:00
iostreamP.h
iostrerror.c Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
ioungetc.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
iovfprintf.c filedoalloc.c, [...]: Remove advertising clause from BSD license, pursuant with 1999-12-15 04:13:06 -05:00
iovfscanf.c filedoalloc.c, [...]: Remove advertising clause from BSD license, pursuant with 1999-12-15 04:13:06 -05:00
iovsprintf.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
iovsscanf.c linuxlibc1.mt (MT_CFLAGS): Add -D_G_STDIO_USES_LIBIO -D_G_HAVE_WEAK_SYMBOL. 1999-03-04 17:19:16 -07:00
isgetline.cc iostream.cc: Add missing calls to isfx and setup a cleanup region for the locked stream. 1999-08-07 00:02:05 -06:00
isgetsb.cc iostream.cc: Add missing calls to isfx and setup a cleanup region for the locked stream. 1999-08-07 00:02:05 -06:00
isscan.cc iostream.cc: Add missing calls to isfx and setup a cleanup region for the locked stream. 1999-08-07 00:02:05 -06:00
istream.h
libio.h libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of _IO_fpos_t. 1999-12-22 10:01:59 +01:00
libioP.h in libiberty/ChangeLog: 2000-06-30 15:25:33 +00:00
osform.cc Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
ostream.h
outfloat.c Uli's libio/libstdc++ patches. 1997-09-16 10:01:55 -06:00
parsestream.cc * editbuf.cc, parsestream.cc, pfstream.cc: Include string.h. 1999-09-30 01:10:07 -06:00
parsestream.h libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of _IO_fpos_t. 1999-12-22 10:01:59 +01:00
peekc.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
pfstream.cc * editbuf.cc, parsestream.cc, pfstream.cc: Include string.h. 1999-09-30 01:10:07 -06:00
pfstream.h
procbuf.cc filedoalloc.c (_POSIX_SOURCE): Remove definition. 1999-04-12 12:27:53 -06:00
procbuf.h
sbform.cc
sbgetline.cc linux.mt (IO_OBJECTS): Add iogetline.o. 1998-02-17 13:54:12 -07:00
sbscan.cc
stdfiles.c Insert libio rewrite and its various changes from devo. 1997-09-06 03:44:38 -04:00
stdiostream.cc filedoalloc.c (_POSIX_SOURCE): Remove definition. 1999-04-12 12:27:53 -06:00
stdiostream.h
stdstrbufs.cc in libiberty/ChangeLog: 2000-06-30 15:25:33 +00:00
stdstreams.cc
stream.cc
stream.h strstream.h (strstreambuf::streambuf): Rename parameters to avoid shadow warning. 1999-12-15 07:46:36 +00:00
streambuf.cc typo typo fixes fixes 1998-05-06 15:09:07 -06:00
streambuf.h libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of _IO_fpos_t. 1999-12-22 10:01:59 +01:00
strfile.h Define __PMT if not already defined. 1998-08-17 12:32:45 +00:00
strops.c (_IO_str_underflow): Read newly available character from buffer as unsigned. 1998-05-22 20:40:02 +00:00
strstream.cc
strstream.h strstream.h (strstreambuf::streambuf): Rename parameters to avoid shadow warning. 1999-12-15 07:46:36 +00:00

README

This is libio, the GNU C/C++ input/output library.

By default, the library is configured to build the C++ iostream
facility (in $libdir/libiostream.a).

The library can be configured to build the C stdio facility
that is part of a C run-time library.

This library is distributed with libg++; see ../libg++/README
for installation instructions, and where to send bug reports
and questions.

* Copyright restrictions

The files in this directory are generally covered by the GNU Public
License (which is in the file ../COPYING), but modified with the
following:

    As a special exception, if you link this library with files
    compiled with a GNU compiler to produce an executable, this does not cause
    the resulting executable to be covered by the GNU General Public License.
    This exception does not however invalidate any other reasons why
    the executable file might be covered by the GNU General Public License.

A few source files and subroutines are covered by other (but
less restrictive) copyright conditions.  E.g. some code (such
as iovfprintf.c) is based on software that was developed by the
University of California, Berkeley, for the Berkeley Software
Distribution (BSD-4.4), and bears their copyright;  and one
file (floatconv.c) is derived from ("free") code copyrighted AT&T.