summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-21 00:54:14 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-21 00:54:14 +0000
commit3e0e49f2b9126e8b092ded10aa65b7ed63dffbba (patch)
treeb2bd8d545c3a23b47aa405d8c17b8530c0cd6152 /gcc/c-family
parentdfd332e9e5b6e307a2ea80ce24ff037bda8fd861 (diff)
downloadgcc-3e0e49f2b9126e8b092ded10aa65b7ed63dffbba.tar.gz
* doc/tm.texi.in (HANDLE_SYSV_PRAGMA,
HANDLE_PRAGMA_PACK_PUSH_POP): Remove. (HANDLE_PRAGMA_PACK_WITH_EXPANSION): Don't refer to HANDLE_SYSV_PRAGMA. * doc/tm.texi: Regenerate. * system.h (HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_WEAK): Poison. * config/alpha/elf.h (HANDLE_SYSV_PRAGMA): Don't define. * config/alpha/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/alpha/osf5.h (HANDLE_SYSV_PRAGMA): Don't define. * config/alpha/vms.h (HANDLE_SYSV_PRAGMA): Don't define. * config/arm/arm.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/arm/netbsd.h (HANDLE_SYSV_PRAGMA): Don't define. * config/cris/cris.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/darwin.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/elfos.h (HANDLE_SYSV_PRAGMA): Don't define. * config/freebsd.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/frv/frv.h (HANDLE_SYSV_PRAGMA): Don't define. * config/i386/cygming.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/i386/djgpp.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/i386/i386-interix.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_WEAK): Don't undefine. * config/i386/netware.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/i386/vxworks.h (HANDLE_SYSV_PRAGMA): Don't define. * config/ia64/hpux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/ia64/ia64.h (HANDLE_SYSV_PRAGMA): Don't define. * config/interix.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_WEAK): Don't undefine. * config/linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/m32r/linux.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK): Don't undefine. * config/m32r/m32r.h (HANDLE_SYSV_PRAGMA): Don't undefine. * config/mep/mep.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/mips/elf.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/mips/sde.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/mmix/mmix.h (HANDLE_SYSV_PRAGMA): Don't define. * config/netbsd.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/openbsd.h (HANDLE_SYSV_PRAGMA): Don't define. * config/pa/pa-hpux.h (HANDLE_SYSV_PRAGMA): Don't define. (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Don't define. * config/rs6000/sysv4.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/rx/rx.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/score/elf.h (HANDLE_SYSV_PRAGMA): Don't define. * config/spu/spu.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. * config/stormy16/stormy16.h (HANDLE_SYSV_PRAGMA): Don't define. * config/xtensa/elf.h (HANDLE_PRAGMA_PACK_PUSH_POP): Don't define. c-family: * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK, HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and HANDLE_PRAGMA_VISIBILITY. * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK, HANDLE_PRAGMA_VISIBILITY): Don't define. (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test. cp: * name-lookup.c (handle_namespace_attrs): Don't check HANDLE_PRAGMA_VISIBILITY. * parser.c (cp_parser_namespace_definition): Don't check HANDLE_PRAGMA_VISIBILITY. testsuite: * g++.dg/cpp/_Pragma1.C: Test for all non-Solaris targets. * gcc.dg/cpp/_Pragma6.c: Test for all non-Solaris targets. * gcc.dg/pack-test-1.c: Test for all non-default_packed targets. * gcc.dg/pack-test-2.c: Test for all targets. * gcc.dg/pragma-align.c: Test for all targets. * gcc.dg/pragma-pack-4.c: Do not skip for AVR. * gcc.dg/ucnid-10.c: Test for all targets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166992 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog9
-rw-r--r--gcc/c-family/c-pragma.c31
-rw-r--r--gcc/c-family/c-pragma.h19
3 files changed, 10 insertions, 49 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index f10fde75fac..86e75ce84c9 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,12 @@
+2010-11-20 Joseph Myers <joseph@codesourcery.com>
+
+ * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
+ HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
+ HANDLE_PRAGMA_VISIBILITY.
+ * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
+ HANDLE_PRAGMA_VISIBILITY): Don't define.
+ (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
+
2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
PR c++/16189
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 9c00983596f..2250bef9fc0 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -54,10 +54,8 @@ typedef struct GTY(()) align_stack {
static GTY(()) struct align_stack * alignment_stack;
-#ifdef HANDLE_PRAGMA_PACK
static void handle_pragma_pack (cpp_reader *);
-#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
/* If we have a "global" #pragma pack(<n>) in effect when the first
#pragma pack(push,<n>) is encountered, this stores the value of
maximum_field_alignment in effect. When the final pop_alignment()
@@ -125,13 +123,6 @@ pop_alignment (tree id)
alignment_stack = entry;
}
-#else /* not HANDLE_PRAGMA_PACK_PUSH_POP */
-#define SET_GLOBAL_ALIGNMENT(ALIGN) (maximum_field_alignment = (ALIGN))
-#define push_alignment(ID, N) \
- GCC_BAD ("#pragma pack(push[, id], <n>) is not supported on this target")
-#define pop_alignment(ID) \
- GCC_BAD ("#pragma pack(pop[, id], <n>) is not supported on this target")
-#endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
/* #pragma pack ()
#pragma pack (N)
@@ -244,7 +235,6 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
case pop: pop_alignment (id); break;
}
}
-#endif /* HANDLE_PRAGMA_PACK */
typedef struct GTY(()) pending_weak_d
{
@@ -257,7 +247,6 @@ DEF_VEC_ALLOC_O(pending_weak,gc);
static GTY(()) VEC(pending_weak,gc) *pending_weaks;
-#ifdef HANDLE_PRAGMA_WEAK
static void apply_pragma_weak (tree, tree);
static void handle_pragma_weak (cpp_reader *);
@@ -380,17 +369,6 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy))
pe->value = value;
}
}
-#else
-void
-maybe_apply_pragma_weak (tree ARG_UNUSED (decl))
-{
-}
-
-void
-maybe_apply_pending_pragma_weaks (void)
-{
-}
-#endif /* HANDLE_PRAGMA_WEAK */
/* GCC supports two #pragma directives for renaming the external
symbol associated with a declaration (DECL_ASSEMBLER_NAME), for
@@ -617,7 +595,6 @@ maybe_apply_renaming_pragma (tree decl, tree asmname)
}
-#ifdef HANDLE_PRAGMA_VISIBILITY
static void handle_pragma_visibility (cpp_reader *);
static VEC (int, heap) *visstack;
@@ -710,8 +687,6 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>");
}
-#endif
-
static void
handle_pragma_diagnostic(cpp_reader *ARG_UNUSED(dummy))
{
@@ -1316,19 +1291,13 @@ init_pragma (void)
cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
PRAGMA_GCC_PCH_PREPROCESS, false, false);
-#ifdef HANDLE_PRAGMA_PACK
#ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
c_register_pragma_with_expansion (0, "pack", handle_pragma_pack);
#else
c_register_pragma (0, "pack", handle_pragma_pack);
#endif
-#endif
-#ifdef HANDLE_PRAGMA_WEAK
c_register_pragma (0, "weak", handle_pragma_weak);
-#endif
-#ifdef HANDLE_PRAGMA_VISIBILITY
c_register_pragma ("GCC", "visibility", handle_pragma_visibility);
-#endif
c_register_pragma ("GCC", "diagnostic", handle_pragma_diagnostic);
c_register_pragma ("GCC", "target", handle_pragma_target);
diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h
index eab23db6cd9..1c29ec455eb 100644
--- a/gcc/c-family/c-pragma.h
+++ b/gcc/c-family/c-pragma.h
@@ -1,6 +1,6 @@
/* Pragma related interfaces.
Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007, 2008 Free Software Foundation, Inc.
+ 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GCC.
@@ -75,26 +75,9 @@ typedef enum pragma_omp_clause {
extern struct cpp_reader* parse_in;
-#define HANDLE_PRAGMA_WEAK SUPPORTS_WEAK
-
-#ifdef HANDLE_SYSV_PRAGMA
-/* We always support #pragma pack for SYSV pragmas. */
-#ifndef HANDLE_PRAGMA_PACK
-#define HANDLE_PRAGMA_PACK 1
-#endif
-#endif /* HANDLE_SYSV_PRAGMA */
-
-
-#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
-/* If we are supporting #pragma pack(push... then we automatically
- support #pragma pack(<n>) */
-#define HANDLE_PRAGMA_PACK 1
-#endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
-
/* It's safe to always leave visibility pragma enabled as if
visibility is not supported on the host OS platform the
statements are ignored. */
-#define HANDLE_PRAGMA_VISIBILITY 1
extern void push_visibility (const char *, int);
extern bool pop_visibility (int);