comparison dmd/mars.h @ 305:2b72433d5c8c trunk

[svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support. Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its Identifier, which should be useful elsewhere too. Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
author lindquist
date Fri, 27 Jun 2008 22:04:35 +0200
parents 90a8c798b0db
children aaade6ded589
comparison
equal deleted inserted replaced
304:3ebc136702dd 305:2b72433d5c8c
14 #ifdef __DMC__ 14 #ifdef __DMC__
15 #pragma once 15 #pragma once
16 #endif /* __DMC__ */ 16 #endif /* __DMC__ */
17 17
18 #include <stdint.h> 18 #include <stdint.h>
19 #include <string> 19 #include <stdarg.h>
20 #include <cstdarg> 20 #define __STDC_FORMAT_MACROS 1
21 #include <inttypes.h>
22 #include <stdarg.h>
21 23
22 #ifdef __DMC__ 24 #ifdef __DMC__
23 #ifdef DEBUG 25 #ifdef DEBUG
24 #undef assert 26 #undef assert
25 #define assert(e) (static_cast<void>((e) || (printf("assert %s(%d) %s\n", __FILE__, __LINE__, #e), halt()))) 27 #define assert(e) (static_cast<void>((e) || (printf("assert %s(%d) %s\n", __FILE__, __LINE__, #e), halt())))
223 225
224 #ifdef IN_GCC 226 #ifdef IN_GCC
225 #include "d-gcc-complex_t.h" 227 #include "d-gcc-complex_t.h"
226 #endif 228 #endif
227 229
230 // taken from GDC
231 // for handling printf incompatibilities
232 #if __MSVCRT__
233 #define PRIuSIZE "Iu"
234 #define PRIxSIZE "Ix"
235 #elif __MINGW32__
236 #define PRIuSIZE "u"
237 #define PRIxSIZE "x"
238 #else
239 #define PRIuSIZE "zu"
240 #define PRIxSIZE "zx"
241 #endif
242
228 struct Module; 243 struct Module;
229 244
230 //typedef unsigned Loc; // file location 245 //typedef unsigned Loc; // file location
231 struct Loc 246 struct Loc
232 { 247 {