summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-02-10 06:07:12 +0000
committerkan <kan@FreeBSD.org>2003-02-10 06:07:12 +0000
commitbdfd3bdba6f4b50386a91bb86dceebc0be6d3364 (patch)
tree0568122183f4edd3824b72fe349a714064c5a26d /contrib/gcc
parented08307335bf17953649d932b01233fdd657faf0 (diff)
downloadFreeBSD-src-bdfd3bdba6f4b50386a91bb86dceebc0be6d3364.zip
FreeBSD-src-bdfd3bdba6f4b50386a91bb86dceebc0be6d3364.tar.gz
Merge FreeBSD modifications into gcc 3.2.2 release:
1.8 printf format error fixes.
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/cp/decl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c
index 6d4e0d2..e17699d08 100644
--- a/contrib/gcc/cp/decl.c
+++ b/contrib/gcc/cp/decl.c
@@ -1,6 +1,6 @@
/* Process declarations and variables for C compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -6182,6 +6182,10 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
}
}
+ /* The name might be from an enclosing class of the current scope. */
+ if (!val && !nonclass && current_class_type)
+ val = qualify_lookup (lookup_nested_field (name, !yylex), flags);
+
/* Now lookup in namespace scopes. */
if (!val || val_is_implicit_typename)
{
@@ -6668,7 +6672,7 @@ cxx_init_decl_processing ()
ptr_ftype_sizetype
= build_function_type (ptr_type_node,
tree_cons (NULL_TREE,
- c_size_type_node,
+ size_type_node,
void_list_node));
newtype = build_exception_variant
(ptr_ftype_sizetype, add_exception_specifier
@@ -9411,10 +9415,10 @@ check_static_variable_definition (decl, type)
the definition, but not both. If it appears in the class, the
member is a member constant. The file-scope definition is always
required. */
- if (CLASS_TYPE_P (type) || TREE_CODE (type) == REFERENCE_TYPE)
+ if (!ARITHMETIC_TYPE_P (type) && TREE_CODE (type) != ENUMERAL_TYPE)
{
error ("invalid in-class initialization of static data member of non-integral type `%T'",
- type);
+ type);
/* If we just return the declaration, crashes will sometimes
occur. We therefore return void_type_node, as if this was a
friend declaration, to cause callers to completely ignore
OpenPOWER on IntegriCloud