aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1998-10-01 10:50:15 +0000
committerNick Clifton <nickc@gcc.gnu.org>1998-10-01 10:50:15 +0000
commite2af664c2d6add614f1ef044f78b0c6ef89cf0d7 (patch)
treef2a375a13ffbab6fc37885d69817a8914b50746e /gcc/varasm.c
parent3a846e6e06590d0c593708b53a8aee20ac2fea32 (diff)
downloadgcc-e2af664c2d6add614f1ef044f78b0c6ef89cf0d7.zip
gcc-e2af664c2d6add614f1ef044f78b0c6ef89cf0d7.tar.gz
gcc-e2af664c2d6add614f1ef044f78b0c6ef89cf0d7.tar.bz2
Add support for #pragma pack(push,<n>) and #pragma pack(pop).
From-SVN: r22710
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c50
1 files changed, 4 insertions, 46 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index d3e12b9..d9e5261 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -116,20 +116,6 @@ int size_directive_output;
tree last_assemble_variable_decl;
-
-#ifdef HANDLE_PRAGMA_WEAK
-/* Any weak symbol declarations waiting to be emitted. */
-
-struct weak_syms
-{
- struct weak_syms *next;
- char *name;
- char *value;
-};
-
-static struct weak_syms *weak_decls;
-#endif
-
/* Nonzero if at least one function definition has been seen. */
static int function_defined;
@@ -4246,38 +4232,6 @@ output_constructor (exp, size)
assemble_zeros (size - total_bytes);
}
-#ifdef HANDLE_PRAGMA_WEAK
-/* Output asm to handle ``#pragma weak'' */
-
-void
-handle_pragma_weak (what, name, value)
- enum pragma_state what;
- char *name, *value;
-{
- if (what == ps_name || what == ps_value)
- {
- struct weak_syms *weak =
- (struct weak_syms *)permalloc (sizeof (struct weak_syms));
- weak->next = weak_decls;
- weak->name = permalloc (strlen (name) + 1);
- strcpy (weak->name, name);
-
- if (what != ps_value)
- weak->value = NULL_PTR;
-
- else
- {
- weak->value = permalloc (strlen (value) + 1);
- strcpy (weak->value, value);
- }
-
- weak_decls = weak;
- }
- else if (! (what == ps_done || what == ps_start))
- warning ("malformed `#pragma weak'");
-}
-#endif /* HANDLE_PRAGMA_WEAK */
-
/* Declare DECL to be a weak symbol. */
void
@@ -4294,6 +4248,10 @@ declare_weak (decl)
/* Emit any pending weak declarations. */
+#ifdef HANDLE_PRAGMA_WEAK
+struct weak_syms * weak_decls;
+#endif
+
void
weak_finish ()
{