From 0b760f1ee64d85e6df5db4c4c70572e4babbc558 Mon Sep 17 00:00:00 2001 From: James Van Artsdalen Date: Fri, 24 Sep 1993 05:00:25 +0000 Subject: [PATCH] (ASM_OUTPUT_ASCII): Enclose macro in "do { .. } while (0)". From-SVN: r5443 --- gcc/config/i386/att.h | 6 ++++-- 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 dce43a92739..a5a45e3dacc 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 abd430b9fff..9809723bc9a 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. */ -- 2.30.2