Commit graph

1471 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
41cb923c0c Wrong condition *sigh* 2012-11-30 15:43:18 +01:00
Wolfgang (Blub) Bumiller
0627e9e06e Still have to parse ahead though 2012-11-30 15:41:01 +01:00
Wolfgang (Blub) Bumiller
b78dab9d71 Don't expand macros inside #if 0 at _all_ 2012-11-30 15:40:19 +01:00
Wolfgang (Blub) Bumiller
5ca4390a1f Don't produce 'unknown token' errors in preprocessing mode 2012-11-30 15:38:03 +01:00
Wolfgang (Blub) Bumiller
7f915c0f2a Don't try to add a slash to actual filenames, only paths... 2012-11-30 15:26:14 +01:00
Wolfgang (Blub) Bumiller
645bd212d7 Don't try to compile an empty output from the preprocessor 2012-11-30 15:20:23 +01:00
Wolfgang (Blub) Bumiller
f587e9cfb3 remove array-field without parens warning since it seems to not be broken in fteqcc anymore 2012-11-30 14:47:55 +01:00
Wolfgang (Blub) Bumiller
0252c0a47a Fix indentation of compile_warning 2012-11-30 14:46:56 +01:00
Wolfgang (Blub) Bumiller
535fd5744b lex_ctx of a return will be at the return keyword now 2012-11-30 14:42:18 +01:00
Wolfgang (Blub) Bumiller
207293bf74 revert 1 of the error messages 2012-11-30 14:37:54 +01:00
Wolfgang (Blub) Bumiller
321a1fe0d6 Keep track of the beginning of a block 2012-11-30 14:37:23 +01:00
Wolfgang (Blub) Bumiller
eec61af381 mark vectors as used when their members are used 2012-11-30 14:30:25 +01:00
Wolfgang (Blub) Bumiller
b476a3deca fteqcc's \{number\} string control sequences 2012-11-30 14:22:00 +01:00
Wolfgang (Blub) Bumiller
fefb51c592 fteqcc like \[ and \] in strings 2012-11-30 14:18:45 +01:00
Wolfgang (Blub) Bumiller
70bda85629 lexer: hex sequences with \x and fteqcc-specific handling if one-digit sequences and <, -, and > sequences 2012-11-30 14:18:15 +01:00
Wolfgang (Blub) Bumiller
600ecda860 Set the full const/var qualifier; only generate warnings about unimplemented functions if they have no qualifier at all 2012-11-30 14:05:25 +01:00
Wolfgang (Blub) Bumiller
5e23e8296d don't just store a 'bool constant' in the ast/ir, store the complete qualifier: 'int cvq', moved CV_ defines into gmqcc.h 2012-11-30 13:47:28 +01:00
Wolfgang (Blub) Bumiller
8e043c8447 Remove the 'warnreturn' parameter in some parser functions 2012-11-30 12:37:46 +01:00
Wolfgang (Blub) Bumiller
39b8d8431c Actually generate the missing return instruction 2012-11-30 12:35:33 +01:00
Wolfgang (Blub) Bumiller
9841bc2f0d ast_loop with no condition and no incrementor are 'for(;;)' and need to loop endlessly instead of once... 2012-11-30 12:28:51 +01:00
Wolfgang (Blub) Bumiller
42376513e7 Still need to generate the jump... 2012-11-30 12:23:27 +01:00
Wolfgang (Blub) Bumiller
a19849099c ast_ifthen will not create dead blocks anymore 2012-11-30 12:21:10 +01:00
Wolfgang (Blub) Bumiller
a58061464e actually removing -Wmissing-return-values from parser.c and enabling the ast code for it 2012-11-30 12:11:36 +01:00
Wolfgang (Blub) Bumiller
2ec0a96a21 Fix a wrong vec_remove in the tailcall pass 2012-11-30 11:59:03 +01:00
Wolfgang (Blub) Bumiller
03cb670096 don't use vec_size but _vec_end in _vec_remove, since using it on an empty vector is an error anyway; this causes a warning about vec_pop doing an effect-less memmove so vec_pop now doesn't use vec_remove anymore actually 2012-11-30 11:55:32 +01:00
Wolfgang (Blub) Bumiller
0983125d2d print the number of performed optimizations after compiling 2012-11-30 11:47:35 +01:00
Wolfgang (Blub) Bumiller
17029ba695 Also print the numeric -O flag which would enable an optimization when listing optimizations via -Ohelp 2012-11-30 11:15:57 +01:00
Wolfgang (Blub) Bumiller
e1fe6cff54 Importing tail-recursion optimization 2012-11-30 11:12:53 +01:00
Wolfgang (Blub) Bumiller
a890589031 -O now, additionally to taking a number, can work like -W and -f to take an actual optimization name 2012-11-30 11:05:58 +01:00
Wolfgang (Blub) Bumiller
fef9303381 moving opts_warn and opts_werror to con.c 2012-11-28 19:18:11 +01:00
Wolfgang (Blub) Bumiller
3c1992fc38 qcvm didn't compile since moving the compile messages to con.c due to undefined references - fixed now 2012-11-28 19:16:35 +01:00
Wolfgang (Blub) Bumiller
8e1ce2ab5e generic compile_error/compile_warning functions in con.c, issuing end-of-non-void warning from within the ast now 2012-11-26 16:12:40 +01:00
Wolfgang (Blub) Bumiller
e6928c6b78 Checking in test for nested ternaries; this is more a test of the ast than the parser 2012-11-26 14:12:56 +01:00
Wolfgang (Blub) Bumiller
08551eefba Fix a small typo 2012-11-26 14:05:31 +01:00
Dale Weiler
ca52ecc20a Remove trailing whitespace for Blub. 2012-11-26 11:12:06 +00:00
Dale Weiler
77272da718 opval is asserted .. need (void) to hide warning when NDEBUG 2012-11-26 02:12:50 +00:00
Dale Weiler
a336fb62ff fast optimized murmur hash with crc seeding, literally zero collision, and roughly only 52 instructions 2012-11-26 00:21:16 +00:00
Wolfgang (Blub) Bumiller
ec2ff09eff operator &~= must not cause the generated binstore to free the destination twice 2012-11-26 00:15:07 +01:00
Wolfgang (Blub) Bumiller
1c9de6763f Same as earlier: remember the outgoing block of a condition in a ternary since it could be different due to shortened logic 2012-11-25 23:54:15 +01:00
Wolfgang (Blub) Bumiller
bf244fc960 ast_breakcont_codegen: error when a target is missing instead of segfaulting trying to access it anyway 2012-11-25 23:51:39 +01:00
Wolfgang (Blub) Bumiller
0564e701c0 endlessloops don't have any other block which could be a continue-target-block, so use the body itself to not continue to NULL 2012-11-25 23:50:42 +01:00
Wolfgang (Blub) Bumiller
23e0637e85 ir_function_create_block now takes a lex_ctx instead of copying from the function; ast_ternary: need to remember the _end_ block of the 2 expressions because that's where the jump is actually supposed to be 2012-11-25 23:48:29 +01:00
Wolfgang (Blub) Bumiller
d70fcdec42 don't set the request-Lvalue flag for an array index 2012-11-25 23:35:49 +01:00
Wolfgang (Blub) Bumiller
0af62801f4 Don't add redeclared globals a second time 2012-11-25 23:35:31 +01:00
Wolfgang (Blub) Bumiller
7c241da548 more verbose errors in the ast when an ir-create fails 2012-11-25 23:32:10 +01:00
Wolfgang (Blub) Bumiller
38df8b5e40 Another case for -fassign-function-types 2012-11-25 23:28:47 +01:00
Wolfgang (Blub) Bumiller
0d3896ca54 introducing -fassign-function-types, previously guarded by std==qcc this is now the flag to cause a warning (-Wassign-function-types) instead of an error when assigning functions of wrong types 2012-11-25 23:27:48 +01:00
Wolfgang (Blub) Bumiller
b4a5517851 fix a lexer error which parsed !! as one operator 2012-11-25 23:24:39 +01:00
Wolfgang (Blub) Bumiller
2f5a26a4de __builtin_debug_printtype directive... helped me down tracking a bug: parsing typedeffed types in parameter lists properly now 2012-11-25 22:57:11 +01:00
Wolfgang (Blub) Bumiller
08ef8bd045 Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc doesn't either... grrr 2012-11-25 22:40:35 +01:00