Commit graph

1627 commits

Author SHA1 Message Date
Dale Weiler
bf53f82d16 Update ini.example (added UNREACHABLE_CODE, and CPP) as warning options 2012-12-21 03:14:31 +00:00
Dale Weiler
f78ab9061b added -Wcpp (for turning off cpp warnings defined with #warning like GCC/clang/pathscale .. no more [-Wunused-variable]) 2012-12-21 03:12:58 +00:00
Dale Weiler
36a90bb866 Implemented #warning and #error preprocessor directives, they're functionally equivalent to CPPs (supporting both string constant and non-string constant versions). Warnings however are printed with a [-Wunused-variable] which isn't correct (TODO: allow systematic changes of -W paramaters in relation to warning fields for preprocessor directives. 2012-12-21 03:08:21 +00:00
Dale Weiler
c7a62970a6 Merge branch 'master' of github.com:graphitemaster/gmqcc 2012-12-20 23:07:33 +00:00
Dale Weiler
e1f0e40341 Implemented roboust compile-time endianess check. 2012-12-20 23:07:06 +00:00
Wolfgang Bumiller
0bbc8a3350 Remove old tempalloc code; disable -Olocaltemps for now 2012-12-20 23:52:54 +01:00
Wolfgang Bumiller
e38bdecd21 Be more correct with sizes; use a better local-alloc strategy 2012-12-20 23:48:41 +01:00
Wolfgang Bumiller
5375400e85 minor: fix ast_function_label 2012-12-20 23:27:23 +01:00
Wolfgang Bumiller
1d3fdea432 Fix util_endianswap; and endianswap the LNO data as well 2012-12-20 22:03:51 +01:00
Wolfgang Bumiller
8d86d7d1c1 Don't check for is_return but for final at the end of a function so that if 'goto' is the last expression we don't try to append a return 2012-12-20 21:05:29 +01:00
Wolfgang Bumiller
93341dd009 *sigh* 2012-12-20 20:57:05 +01:00
Wolfgang Bumiller
a6547a15f3 no need to check the array, the 2nd NOT is a NOT_F 2012-12-20 20:56:49 +01:00
Wolfgang Bumiller
8dc6696957 manpage: -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings 2012-12-20 20:56:08 +01:00
Wolfgang Bumiller
ccbccad994 fix -fcorrect-logic to use double-not instead of a single one - wow that was a bad one 2012-12-20 20:55:56 +01:00
Wolfgang Bumiller
712be84bba Testcases for -ftrue-empty-strings and -ffalse-empty-strings 2012-12-20 20:43:58 +01:00
Wolfgang Bumiller
68c4070f62 Fix the -fcorrect-logic condition 2012-12-20 20:40:59 +01:00
Wolfgang Bumiller
0988b731b7 Fix -fcorrect-logic 2012-12-20 20:33:05 +01:00
Wolfgang Bumiller
b595ec03f8 fix a leak in the local-allocator 2012-12-20 20:26:54 +01:00
Wolfgang Bumiller
98b6772db9 Fix a leak: free code_linenums 2012-12-20 20:26:14 +01:00
Wolfgang Bumiller
4f9c7861ec For loops may have an empty condition - don't try processing a NULL 2012-12-20 20:23:35 +01:00
Wolfgang Bumiller
a985a5cab1 while/for/do now all use process_condition, ast_loop got 2 new parameters for more efficient translation 2012-12-20 20:22:31 +01:00
Wolfgang Bumiller
d72cb42b08 process_condition function used by parse_if - need to still add it to loops 2012-12-20 19:51:30 +01:00
Wolfgang Bumiller
db577fdf17 -ftrue-empty-strings now changes type_not_instr[TYPE_STRING] to INSTR_NOT_F 2012-12-20 19:32:57 +01:00
Wolfgang Bumiller
34063108a6 since unary not doesn't fold these, remove them from immediate_is_true 2012-12-20 19:19:12 +01:00
Wolfgang Bumiller
4319922b3c introducing an immediate_is_true which follows the new -f flags on strings and vector truthfulness, used in logic-op constant folding; const folding now disabled for functions-constants on NOT because it's stupid 2012-12-20 19:18:22 +01:00
Wolfgang Bumiller
6b9eff19f1 unary not now uses NOT_F with -ftrue-empty-strings 2012-12-20 19:04:56 +01:00
Wolfgang Bumiller
b85441d6af Making logical 'and' and 'or' use NOT_ in -fcorrect-logic for both operands normally, but only for the first with -fperl-logic 2012-12-20 19:00:23 +01:00
Wolfgang Bumiller
d5cfe74d5d Adding -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings flags; not used yet 2012-12-20 18:59:05 +01:00
Wolfgang Bumiller
8f858a8f3e manpage: typo 2012-12-20 16:56:22 +01:00
Wolfgang Bumiller
5b98011f5f Fix condition on whether or not to print 'error' or 'warning' 2012-12-20 16:55:00 +01:00
Wolfgang Bumiller
6cd821d459 -Werror-<warning> should actually use opts_setwerror 2012-12-20 16:53:09 +01:00
Wolfgang Bumiller
b360245b45 -Werror-<warning>, -Wno-error-<warning>, manpage updated 2012-12-20 16:49:10 +01:00
Wolfgang Bumiller
78b1105c10 manpage: -Wunreachable-code 2012-12-20 16:41:40 +01:00
Wolfgang Bumiller
fffa78c7a6 Reorder the warnings in opts.c to match their oder in opts.def, added WARN_LOCAL_SHADOWS to the list with its default false parameter 2012-12-20 16:32:36 +01:00
Wolfgang Bumiller
eb8dc60981 Turn -fallow-unreachable-code into a -Wunreachable-code 2012-12-20 16:29:32 +01:00
Wolfgang Bumiller
145c011247 Fix object dependency: OBJ -> OBJ_D so they all depend on gmqcc.h again properly 2012-12-20 16:28:35 +01:00
Wolfgang Bumiller
915c002be4 Temporarily fix noreturn bug by creating an actual dummy return instruction after the call for now 2012-12-20 16:20:08 +01:00
Wolfgang Bumiller
4ef0e8c66e -g sets opts.g and -debug causes blocks to be labeled 2012-12-20 16:04:10 +01:00
Wolfgang Bumiller
b02c4e4d10 sscanf_s only for _MSC_VER not WIN32 in exec.c 2012-12-20 15:46:31 +01:00
Wolfgang Bumiller
5d51930adf Oh god I hate this so much 2012-12-20 15:45:15 +01:00
Wolfgang Bumiller
bb356bffa5 that should have gone into the second to last commit 2012-12-20 15:27:15 +01:00
Wolfgang Bumiller
0f0a458cc4 WINDOWS 8 USERS ARE IDIOTS, YES YOU SHOULD TAKE THIS PERSONALLY 2012-12-20 15:26:45 +01:00
Wolfgang Bumiller
d76e6b103d ast_return needs the correct context... 2012-12-20 15:01:19 +01:00
Wolfgang Bumiller
3119a95a89 -fallow-unreachable-code 2012-12-20 14:41:16 +01:00
Wolfgang Bumiller
79f3f980e9 vector initialization tests 2012-12-20 14:12:22 +01:00
Wolfgang Bumiller
a274f8ec07 making the uninitialized-var on vector warning now check all members; ir_value_vector_member now also appends _x,_y,_z since they're used in the used-unintialized message 2012-12-20 14:06:25 +01:00
Wolfgang Bumiller
8adbb2f5ac Remove the suffix entirely 2012-12-20 13:44:53 +01:00
Wolfgang Bumiller
7833efd6e1 UL->ULL 2012-12-20 12:55:21 +01:00
Wolfgang Bumiller
a301796186 Added tests for 'noreturn' 2012-12-20 12:00:39 +01:00
Dale Weiler
f1a662a422 ugh todo: seed per ht, not per hash 2012-12-20 10:21:31 +00:00