This is the mail archive of the
libstdc++-cvs@gcc.gnu.org
mailing list for the libstdc++ project.
gcc gcc/ChangeLog gcc/c-common.c gcc/cp/Change ...
- From: mmitchel at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org, libstdc++-cvs at gcc dot gnu dot org
- Date: 30 Jan 2003 07:24:02 -0000
- Subject: gcc gcc/ChangeLog gcc/c-common.c gcc/cp/Change ...
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-01-30 07:24:02
Modified files:
gcc : ChangeLog c-common.c
gcc/cp : ChangeLog call.c class.c cp-tree.h decl.c
decl2.c error.c init.c method.c parser.c pt.c
semantics.c typeck.c typeck2.c
gcc/testsuite : ChangeLog
libstdc++-v3 : ChangeLog
libstdc++-v3/include/std: std_limits.h
Added files:
gcc/testsuite/g++.dg/parse: constant1.C
Log message:
* c-common.c (builtin_define_float_constants): Define
__<TYPE>_HAS_INFINITY__ and __<TYPE>_HAS_QUIET_NAN__.
* call.c (build_field_call): Use build_new_op, not build_opfncall.
(prep_operand): New function.
(build_new_op): Use it. Remove dead code.
* class.c (pushclass): Change "modify" parameter type from int to
bool.
(currently_open_class): Use same_type_p, not pointer equality.
(push_nested_class): Adjust calls to pushclass, remove modify
parameter.
* cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
(pushclass): Change prototype.
(push_nested_class): Likewise.
(grokoptypename): Remove.
(build_opfncall): Remove.
(value_dependent_expression_p): Declare.
(resolve_typename_type): Likewise.
(resolve_typename_type_in_current_instantiation): Likewise.
(enter_scope_of): Remove.
(tsubst): Remove.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
* decl.c (warn_about_implicit_typename_lookup): Remove.
(finish_case_label): Return error_mark_node for erroneous labels.
(start_decl): Adjust calls to push_nested_class.
(grokfndecl): Call push_scope/pop_scope around call to
duplicate_decls.
(grokdeclarator): Do not call tsubst.
(start_function): Adjust calls to push_nested_class.
* decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
(check_classfn): Use push_scope/pop_scope around type comparisions.
(grokoptypename): Remove.
(push_sscope): Adjust call to push_nested_class.
* error.c (dump_type): Show cv-qualification of typename types.
* init.c (build_member_call): Use build_new_op, not
build_opfncall.
* method.c (build_opfncall): Remove.
* parser.c (cp_parser): Add allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_constant_expression): Adjust prototype.
(cp_parser_resolve_typename_type): Remove.
(cp_parser_non_constant_expression): New function.
(cp_parser_non_constant_id_expression): Likewise.
(cp_parser_new): Set allow_non_constant_expression_p and
non_constant_expression_p.
(cp_parser_primary_expression): Reject `this' and `va_arg' in
constant-expressions. Note that dependent names aren't really
constant.
(cp_parser_postfix_expression): Reject conversions to non-integral
types in constant-expressions. Neither are increments or
decrements.
(cp_parser_unary_expression): Reject increments and decrements in
constant-expressions.
(cp_parser_direct_new_declarator): Adjust call to
cp_parser_constant_expression.
(cp_parser_cast_expression): Reject conversions to non-integral
types in constant-expressions.
(cp_parser_assignment_expression): Rejects assignments in
constant-expressions.
(cp_parser_expression): Reject commas in constant-expressions.
(cp_parser_labeled_statement): Adjust call to
cp_parser_constant_expression.
(cp_parser_direct_declarator): Simplify array bounds, even in
templates, when they are non-dependent. Use
resolve_typename_type, not cp_parser_resolve_typename_type.
(cp_parser_class_head): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_member_declaration): Adjust call to
cp_parser_constant_expression.
(cp_parser_constant_initializer): Likewise.
(cp_parser_constructor_declarator): Use resolve_typename_type, not
cp_parser_resolve_typename_type.
(cp_parser_late_parsing_default_args): Adjust call to
push_nested_class.
* pt.c (tsubst): Give it internal linkage.
(tsubst_expr): Likewise.
(tsubst_copy): Likewise.
(tsubst_copy_and_build): Likewise.
(push_access_scope_real): Likewise.
(tsubst_friend_class): Likewise.
(instantiate_class_template): Adjust call to pushclass.
(value_dependent_expression_p): Give it external linkage.
Robustify.
(resolve_typename_type): New function.
* semantics.c (finish_call_expr): Use build_new_op, not
build_opfncall.
(begin_constructor_declarator): Remove.
(begin_class_definition): Adjust call to pushclass.
(enter_scope_of): Remove.
* typeck.c (comptypes): Resolve typename types as appropriate.
(build_x_indirect_ref): Use build_new_op, not build_opfncall.
(build_x_compound_expr): Likewise.
(build_modify_expr): Likewise.
(build_x_modify_expr): Likewise.
* typeck2.c (build_x_arrow): Likewise.
* g++.dg/parser/constant1.C: New test.
* include/std/std_limits.h (numeric_limits<float>::has_infinity):
Use __FLT_HAS_INIFINITY__ to initialize.
(numeric_limits<float>::has_quiet_NaN): Likewise.
(numeric_limits<double>::has_infinity): Use __DBL_HAS_INIFINITY__
to initialize.
(numeric_limits<double>::has_quiet_NaN): Likewise.
(numeric_limits<long double>::has_infinity): Use
__LDBL_HAS_INIFINITY__ to initialize.
(numeric_limits<long_double>::has_quiet_NaN): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.16570&r2=1.16571
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.398&r2=1.399
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3184&r2=1.3185
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.353&r2=1.354
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.516&r2=1.517
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.806&r2=1.807
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.991&r2=1.992
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&r1=1.596&r2=1.597
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.197&r2=1.198
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.307&r2=1.308
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&r1=1.244&r2=1.245
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.41&r2=1.42
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.655&r2=1.656
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.296&r2=1.297
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.445&r2=1.446
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck2.c.diff?cvsroot=gcc&r1=1.135&r2=1.136
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2385&r2=1.2386
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/constant1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1513&r2=1.1514
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/std/std_limits.h.diff?cvsroot=gcc&r1=1.20&r2=1.21