This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[vms/committed]: Handle #pragma __nomember_alignment byte
- From: Tristan Gingold <gingold at adacore dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 Apr 2012 10:50:36 +0200
- Subject: [vms/committed]: Handle #pragma __nomember_alignment byte
Hi,
this patch handles the 'byte' alignment that appears in standard VMS headers when a C++ compiler is used.
It also force the support of parameterless variadic functions to be compatible with standard VMS headers.
Committed on trunk after ia64-hp-openvms cross build.
Tristan.
2012-04-03 Tristan Gingold <gingold@adacore.com>
* config/vms/vms-c.c (vms_pragma_nomember_alignment): Handle
'byte' alignment.
(vms_c_common_override_options): Allow parameterless variadic
functions.
Index: gcc/config/vms/vms-c.c
===================================================================
--- gcc/config/vms/vms-c.c (revision 186100)
+++ gcc/config/vms/vms-c.c (working copy)
@@ -120,7 +120,9 @@
if (arg[0] == '_' && arg[1] == '_')
arg += 2;
- if (strcmp (arg, "word") == 0)
+ if (strcmp (arg, "byte") == 0)
+ maximum_field_alignment = 1 * BITS_PER_UNIT;
+ else if (strcmp (arg, "word") == 0)
maximum_field_alignment = 2 * BITS_PER_UNIT;
else if (strcmp (arg, "longword") == 0)
maximum_field_alignment = 4 * BITS_PER_UNIT;
@@ -453,6 +455,9 @@
void
vms_c_common_override_options (void)
{
+ /* Allow variadic functions without parameters (as declared in starlet). */
+ flag_allow_parameterless_variadic_functions = TRUE;
+
/* Initialize c_default_pointer_mode. */
switch (flag_vms_pointer_size)
{