Commit graph

416 commits

Author SHA1 Message Date
Wolfgang Bumiller
5bb9351a3f Allow assigning nil to a field 2012-12-31 11:23:49 +01:00
Wolfgang Bumiller
0c4806b4a0 Adding -Wparenthesis, fixing constant folding of && and || 2012-12-31 11:11:46 +01:00
Wolfgang Bumiller
5a013c5b89 Do we REALLY need to listen to splint? 2012-12-30 11:59:29 +01:00
Wolfgang Bumiller
d9282ed988 Clean up trailing whitespaces 2012-12-30 11:03:59 +01:00
Dale Weiler
46374e94ca Add support for user defined messages for [[deprecated]] generalized attribute 2012-12-30 09:58:52 +00:00
Dale Weiler
921877e8a4 Implement [[deprecated]] general attribute, will mark functions as deprecated. Making calls to functions marked as such will trigger a compiler warning. Enabled by default. 2012-12-30 06:43:07 +00:00
Wolfgang Bumiller
755ee5462f Properly support globals initialized to nil 2012-12-29 21:15:59 +01:00
Wolfgang Bumiller
8bdd060112 -Wdifferent-qualifiers, -Wdifferent-attributes 2012-12-29 17:41:20 +01:00
Wolfgang Bumiller
33be9d4559 Don't allow code like: v * '0 1 0' = 3; to actually work... 2012-12-29 15:13:54 +01:00
Wolfgang Bumiller
73bc4cc3e4 -Ovector-components 2012-12-29 15:05:04 +01:00
Wolfgang Bumiller
14e954284e more general qualifier/attribute parsing, added not-yet-used AST_FLAG_INLINE and [[inline]] 2012-12-28 19:46:28 +01:00
Wolfgang Bumiller
47baca22d9 -Wuninitialized-const, -Wuninitialized-global 2012-12-28 19:07:43 +01:00
Wolfgang Bumiller
77d454725a -Wreserved-names, -fpermissive allows local variables named 'nil' to be created even with -funtyped-nil, they supersede the global untyped 'nil' 2012-12-28 18:22:09 +01:00
Wolfgang Bumiller
2e0216b7c6 'nil' global with -funtyped-nil 2012-12-28 18:16:19 +01:00
Dale Weiler
3688dab048 Fix a very possible bug 2012-12-28 12:50:37 +00:00
Wolfgang Bumiller
a60d0182db finish parsing of labeled loops; ast support added 2012-12-28 00:04:09 +01:00
Wolfgang Bumiller
c702970a0e distinguish between break/continue levels in the parser 2012-12-27 23:52:57 +01:00
Wolfgang Bumiller
ebb7cb2ae3 parsing of loop labels 2012-12-27 23:43:20 +01:00
Wolfgang Bumiller
517b6fed81 Another bool->int fix; now clang-compiled gmqcc actually works... 2012-12-27 14:33:58 +01:00
Wolfgang Bumiller
5cfd97c344 -fbail-on-werror option 2012-12-27 12:46:36 +01:00
Wolfgang Bumiller
f832b86dcd Fixing uninitialized warnings in parser.c 2012-12-26 20:00:17 +01:00
Wolfgang Bumiller
da927b5d41 print an error when static is used in global scope - this is currently not being handled as expected 2012-12-24 11:38:33 +01:00
Wolfgang Bumiller
2b468cb0ee Added the 'static' keyword.
Implements #71
2012-12-24 11:30:58 +01:00
Dale Weiler
d51a6ab3db Whitespace 2012-12-23 09:10:31 +00:00
Dale Weiler
5bc815c63f Revert "Whitespace fixes"
This reverts commit 4580dcf1ea.
2012-12-23 09:10:07 +00:00
Dale Weiler
4580dcf1ea Whitespace fixes 2012-12-23 08:42:53 +00:00
Dale Weiler
c3964cf29d Make compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr hack. 2012-12-23 07:51:19 +00:00
Dale Weiler
d35d953a91 Remove parser_compile_string_len, and make parser_compiler_string take an additional length argument. 2012-12-23 07:22:15 +00:00
Wolfgang Bumiller
e8cd9411b0 -Wunknown-attribute; and don't error on unknown attributes 2012-12-22 18:16:41 +01:00
Wolfgang Bumiller
7cf0ba5aa8 'noreturn' is now an attribute and parsed as [[noreturn]] 2012-12-22 18:09:56 +01:00
Wolfgang Bumiller
1f070b740f -ffalse-empty-strings in && and || 2012-12-22 17:31:31 +01:00
Wolfgang Bumiller
0fe71af4ce -fcorrect-logic now handles only vectors 2012-12-22 17:18:37 +01:00
Wolfgang Bumiller
8459895fdd Fix a bug with -fperl-logic and -fcorrect-logic 2012-12-22 16:25:19 +01:00
Dale Weiler
fa401b6f56 Cleanups and make compile with clang again with no warnings. 2012-12-22 08:22:50 +00:00
Dale Weiler
7d2a2f2ade cleanups and fixes that cppcheck found 2012-12-22 08:07:54 +00: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
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
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
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
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
d76e6b103d ast_return needs the correct context... 2012-12-20 15:01:19 +01:00
Wolfgang (Blub) Bumiller
57aaf57dfc Revert "Fix FTFBS stuff"
This reverts commit 2cc51b8eb0.
2012-12-19 22:15:38 +01:00
Dale Weiler
2cc51b8eb0 Fix FTFBS stuff 2012-12-19 21:05:40 +00:00