summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-10-10 04:53:46 +0000
committerkan <kan@FreeBSD.org>2002-10-10 04:53:46 +0000
commit897ceed212077919060bf6dd60e2c91252d6aad7 (patch)
tree26c94df6f5a0f21710c91a27e778b9f3d5ffa0ea /contrib/gcc/cp
parentf76cf2a76b1dd40a304aebec1879aef0101b1499 (diff)
downloadFreeBSD-src-897ceed212077919060bf6dd60e2c91252d6aad7.zip
FreeBSD-src-897ceed212077919060bf6dd60e2c91252d6aad7.tar.gz
Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.8 printf format error fixes Approved by: obrien
Diffstat (limited to 'contrib/gcc/cp')
-rw-r--r--contrib/gcc/cp/decl.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c
index 657e844..4a48b5e 100644
--- a/contrib/gcc/cp/decl.c
+++ b/contrib/gcc/cp/decl.c
@@ -6526,6 +6526,12 @@ cxx_init_decl_processing ()
flag_inline_functions = 0;
}
+ /* Force minimum function alignment if using the least significant
+ bit of function pointers to store the virtual bit. */
+ if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn
+ && force_align_functions_log < 1)
+ force_align_functions_log = 1;
+
/* Initially, C. */
current_lang_name = lang_name_c;
@@ -7331,14 +7337,8 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
switch (TREE_CODE (decl))
{
case TYPE_DECL:
- /* typedef foo = bar means give foo the same type as bar.
- We haven't parsed bar yet, so `cp_finish_decl' will fix that up.
- Any other case of an initialization in a TYPE_DECL is an error. */
- if (pedantic || list_length (declspecs) > 1)
- {
- error ("typedef `%D' is initialized", decl);
- initialized = 0;
- }
+ error ("typedef `%D' is initialized", decl);
+ initialized = 0;
break;
case FUNCTION_DECL:
@@ -8250,12 +8250,6 @@ cp_finish_decl (decl, init, asmspec_tree, flags)
/* Take care of TYPE_DECLs up front. */
if (TREE_CODE (decl) == TYPE_DECL)
{
- if (init && DECL_INITIAL (decl))
- {
- /* typedef foo = bar; store the type of bar as the type of foo. */
- TREE_TYPE (decl) = type = TREE_TYPE (init);
- DECL_INITIAL (decl) = init = NULL_TREE;
- }
if (type != error_mark_node
&& IS_AGGR_TYPE (type) && DECL_NAME (decl))
{
@@ -11354,9 +11348,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
bad_specifiers (decl, "type", virtualp, quals != NULL_TREE,
inlinep, friendp, raises != NULL_TREE);
- if (initialized)
- error ("typedef declaration includes an initializer");
-
return decl;
}
OpenPOWER on IntegriCloud