Mercurial > projects > ldc
comparison dmd/mars.h @ 1640:9bf06e02070b
Merge DMD 1.057.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 08 Mar 2010 21:39:20 +0100 |
parents | 44b145be2ef5 |
children |
comparison
equal
deleted
inserted
replaced
1639:41145d30acb8 | 1640:9bf06e02070b |
---|---|
92 #define DMDV2 0 // Version 2.0 features | 92 #define DMDV2 0 // Version 2.0 features |
93 #define BREAKABI 1 // 0 if not ready to break the ABI just yet | 93 #define BREAKABI 1 // 0 if not ready to break the ABI just yet |
94 #define STRUCTTHISREF DMDV2 // if 'this' for struct is a reference, not a pointer | 94 #define STRUCTTHISREF DMDV2 // if 'this' for struct is a reference, not a pointer |
95 #define SNAN_DEFAULT_INIT DMDV2 // if floats are default initialized to signalling NaN | 95 #define SNAN_DEFAULT_INIT DMDV2 // if floats are default initialized to signalling NaN |
96 #define SARRAYVALUE DMDV2 // static arrays are value types | 96 #define SARRAYVALUE DMDV2 // static arrays are value types |
97 #define MODULEINFO_IS_STRUCT DMDV2 // if ModuleInfo is a struct rather than a class | |
97 | 98 |
98 // Set if C++ mangling is done by the front end | 99 // Set if C++ mangling is done by the front end |
99 #define CPP_MANGLE (DMDV2 && (TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS)) | 100 #define CPP_MANGLE (DMDV2 && (TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS)) |
100 | 101 |
101 /* Other targets are TARGET_LINUX, TARGET_OSX, TARGET_FREEBSD and | 102 /* Other targets are TARGET_LINUX, TARGET_OSX, TARGET_FREEBSD and |
180 bool useSwitchError; // check for switches without a default | 181 bool useSwitchError; // check for switches without a default |
181 bool useUnitTests; // generate unittest code | 182 bool useUnitTests; // generate unittest code |
182 bool useInline; // inline expand functions | 183 bool useInline; // inline expand functions |
183 bool warnings; // enable warnings | 184 bool warnings; // enable warnings |
184 ubyte Dversion; // D version number | 185 ubyte Dversion; // D version number |
186 // 1: warnings as errors | |
187 // 2: informational warnings (no errors) | |
185 char safe; // enforce safe memory model | 188 char safe; // enforce safe memory model |
186 | 189 |
187 char *argv0; // program name | 190 char *argv0; // program name |
188 Array *imppath; // array of char*'s of where to look for import modules | 191 Array *imppath; // array of char*'s of where to look for import modules |
189 Array *fileImppath; // array of char*'s of where to look for file import modules | 192 Array *fileImppath; // array of char*'s of where to look for file import modules |
281 char *ldc_version; | 284 char *ldc_version; |
282 char *llvm_version; | 285 char *llvm_version; |
283 | 286 |
284 Param params; | 287 Param params; |
285 unsigned errors; // number of errors reported so far | 288 unsigned errors; // number of errors reported so far |
286 unsigned gag; // !=0 means gag reporting of errors | 289 unsigned warnings; // number of warnings reported so far |
290 unsigned gag; // !=0 means gag reporting of errors & warnings | |
287 | 291 |
288 Global(); | 292 Global(); |
289 }; | 293 }; |
290 | 294 |
291 extern Global global; | 295 extern Global global; |
424 | 428 |
425 typedef uint64_t StorageClass; | 429 typedef uint64_t StorageClass; |
426 | 430 |
427 | 431 |
428 void warning(Loc loc, const char *format, ...) IS_PRINTF(2); | 432 void warning(Loc loc, const char *format, ...) IS_PRINTF(2); |
429 void vwarning(Loc loc, const char *format, va_list); | |
430 void error(Loc loc, const char *format, ...) IS_PRINTF(2); | 433 void error(Loc loc, const char *format, ...) IS_PRINTF(2); |
431 void verror(Loc loc, const char *format, va_list); | 434 void verror(Loc loc, const char *format, va_list); |
432 | 435 void vwarning(Loc loc, const char *format, va_list); |
433 #ifdef __GNUC__ | 436 #ifdef __GNUC__ |
434 __attribute__((noreturn)) | 437 __attribute__((noreturn)) |
435 #endif | 438 #endif |
436 void fatal(); | 439 void fatal(); |
437 | 440 |