diff options
author | James Van Artsdalen <jrv@gnu.org> | 1993-09-24 05:00:25 +0000 |
---|---|---|
committer | James Van Artsdalen <jrv@gnu.org> | 1993-09-24 05:00:25 +0000 |
commit | 0b760f1ee64d85e6df5db4c4c70572e4babbc558 (patch) | |
tree | ccac83461e98f4ead062568fe86f9af50f07af44 | |
parent | 4f1c4914f42087b715066c2b529cb032e9d36d43 (diff) | |
download | gcc-0b760f1ee64d85e6df5db4c4c70572e4babbc558.zip gcc-0b760f1ee64d85e6df5db4c4c70572e4babbc558.tar.gz gcc-0b760f1ee64d85e6df5db4c4c70572e4babbc558.tar.bz2 |
(ASM_OUTPUT_ASCII): Enclose macro in "do { .. } while (0)".
From-SVN: r5443
-rw-r--r-- | gcc/config/i386/att.h | 6 | ||||
-rw-r--r-- | gcc/config/i386/sun386.h | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/config/i386/att.h b/gcc/config/i386/att.h index dce43a9..a5a45e3 100644 --- a/gcc/config/i386/att.h +++ b/gcc/config/i386/att.h @@ -37,13 +37,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* How to output an ASCII string constant. */ #define ASM_OUTPUT_ASCII(FILE, p, size) \ +do \ { int i = 0; \ while (i < (size)) \ { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \ fprintf ((FILE), "%s ", ASM_BYTE_OP); } \ - else fprintf ((FILE), ","); \ + else fprintf ((FILE), ","); \ fprintf ((FILE), "0x%x", ((p)[i++] & 0377)) ;} \ - fprintf ((FILE), "\n"); } + fprintf ((FILE), "\n"); \ +} while (0) /* Do use .optim by default on this machine. */ #undef ASM_FILE_START_1 diff --git a/gcc/config/i386/sun386.h b/gcc/config/i386/sun386.h index abd430b..9809723 100644 --- a/gcc/config/i386/sun386.h +++ b/gcc/config/i386/sun386.h @@ -40,13 +40,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* How to output an ASCII string constant. */ #define ASM_OUTPUT_ASCII(FILE, p, size) \ +do \ { int i = 0; \ while (i < (size)) \ - { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \ + { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \ fprintf ((FILE), "%s ", ASM_BYTE_OP); } \ - else fprintf ((FILE), ","); \ + else fprintf ((FILE), ","); \ fprintf ((FILE), "0x%x", ((p)[i++] & 0377)) ;} \ - fprintf ((FILE), "\n"); } + fprintf ((FILE), "\n"); \ +} while (0) /* Output at beginning of assembler file. */ /* The .file command should always begin the output. */ |