This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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								\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]