summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp/decl.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-10-10 04:40:18 +0000
committerkan <kan@FreeBSD.org>2002-10-10 04:40:18 +0000
commit92318bc515d223b2eeebb665f76e131dd2318b2b (patch)
treef505e08c93c8d3d8e51f5dac050b459cce4d4ae2 /contrib/gcc/cp/decl.c
parent48f00f4c43af857e09b5f961c806a8811c504a3c (diff)
downloadFreeBSD-src-92318bc515d223b2eeebb665f76e131dd2318b2b.zip
FreeBSD-src-92318bc515d223b2eeebb665f76e131dd2318b2b.tar.gz
Gcc 3.2.1-prerelease from the FSF anoncvs repo gcc-3_2-branch on October 9th 2002 20:15 EST.
Diffstat (limited to 'contrib/gcc/cp/decl.c')
-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 105e7a0..26484d7 100644
--- a/contrib/gcc/cp/decl.c
+++ b/contrib/gcc/cp/decl.c
@@ -6517,6 +6517,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;
@@ -7322,14 +7328,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:
@@ -8241,12 +8241,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))
{
@@ -11345,9 +11339,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