This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Commit: Fix i386 ASM_OUTPUT_ASCII macro for C++ compilation.
- From: Nick Clifton <nickc at redhat dot com>
- To: rth at redhat dot com, jh at suse dot cz, ubizjak at gmail dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 16 Aug 2012 11:34:34 +0100
- Subject: Commit: Fix i386 ASM_OUTPUT_ASCII macro for C++ compilation.
Hi Richard, Hi Jan, Hi Uros,
I am applying the patch below as an obvious fix for this problem when
building an i386-elf targeted toolchain:
gcc/dwarf2asm.c: In function 'void dw2_asm_output_nstring(const char*, size_t, const char*, ...)':
gcc/dwarf2asm.c:334:7: error: invalid conversion from 'const unsigned char*' to 'const char*' [-fpermissive]
With the patch applied the compiler now builds correctly.
Cheers
Nick
gcc/ChangeLog
2012-08-16 Nick Clifton <nickc@redhat.com>
* config/i386/i386elf.h (ASM_OUTPUT_ASCII): Cast _ascii_bytes
before passing it to ASM_OUTPUT_LIMITED_STRING.
Index: gcc/config/i386/i386elf.h
===================================================================
--- gcc/config/i386/i386elf.h (revision 190438)
+++ gcc/config/i386/i386elf.h (working copy)
@@ -73,7 +73,7 @@
fputc ('\n', (FILE)); \
bytes_in_chunk = 0; \
} \
- ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \
+ ASM_OUTPUT_LIMITED_STRING ((FILE), (const char *) _ascii_bytes); \
_ascii_bytes = p; \
} \
else \