Commit graph

1349 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
8188d0b9f7 Sanity check for -Wternary-precedence 2012-12-01 12:36:54 +01:00
Wolfgang (Blub) Bumiller
ed4c513b1e -Wternary-precedence; *sight* this is tough 2012-12-01 12:35:46 +01:00
Wolfgang (Blub) Bumiller
624e95ee03 Generate extparams on calls too since the to-be-called function needs not be generated first after all 2012-12-01 11:43:54 +01:00
Wolfgang (Blub) Bumiller
b966cd4f4d More ternary fixes 2012-12-01 00:50:04 +01:00
Wolfgang (Blub) Bumiller
43c0343755 Offsetting builtins so we can use 'if builtin!=0' as condition but also allow a '#0' builtin 2012-12-01 00:36:24 +01:00
Wolfgang (Blub) Bumiller
e102c1632b Upping the default max-array-limit *sigh* 2012-12-01 00:34:18 +01:00
Wolfgang (Blub) Bumiller
75ab0e6663 and 'const' is a keyword, not an ident 2012-12-01 00:33:07 +01:00
Wolfgang (Blub) Bumiller
ac9d68387c var const / const var - both need to be allowed 2012-12-01 00:32:18 +01:00
Wolfgang (Blub) Bumiller
d52879315d some SYA fix; adding optional variable parsing to the head of a switch block 2012-12-01 00:31:00 +01:00
Wolfgang (Blub) Bumiller
46942df6c0 skipwhite bugfix 2012-11-30 21:51:18 +01:00
Wolfgang (Blub) Bumiller
d148cfdcd5 bodyless loops still have to loop 2012-11-30 21:34:49 +01:00
Wolfgang (Blub) Bumiller
8d014cc6eb changing parse_statement_or_block to return a bool and put the output block into a pointer, so that NULL can still be possible 2012-11-30 21:31:19 +01:00
Wolfgang (Blub) Bumiller
cda62cef20 apparently #0 is a valid builtin number, used for some NULL funcs 2012-11-30 21:25:18 +01:00
Wolfgang (Blub) Bumiller
2a2465c884 prepare fields before generating globals so we avoid the need for relocating initialized fieldpointers 2012-11-30 21:22:48 +01:00
Wolfgang (Blub) Bumiller
2a3e7c1cff field constants - revert globals generated after fields 2012-11-30 21:11:25 +01:00
Wolfgang (Blub) Bumiller
316298650e remember if an ast_value is a field-declaration, build fields before globals 2012-11-30 21:03:57 +01:00
Wolfgang (Blub) Bumiller
1a264e5576 additional info in an internal error 2012-11-30 20:40:48 +01:00
Wolfgang (Blub) Bumiller
b3a9c4e8d9 Use the field parameter type on the raw paramter type list for their sizes. 2012-11-30 20:33:40 +01:00
Wolfgang (Blub) Bumiller
e0a7f8a484 qcvm -printfuns; prog_section_function.nargs is now signed as fteqcc sets builtins with varargs to have -1 params 2012-11-30 20:20:13 +01:00
Wolfgang (Blub) Bumiller
a9a41a786e Adding opts.def as dep to everything which has gmqcc.h as dep 2012-11-30 18:21:14 +01:00
Wolfgang (Blub) Bumiller
6fc00e523d All ir_instrs now get their lex-context, so that we can create an LNO file with -flno 2012-11-30 18:20:02 +01:00
Wolfgang (Blub) Bumiller
2f3612d905 increase the ridiculously low size limit on lex-pragma parameters 2012-11-30 17:28:46 +01:00
Wolfgang (Blub) Bumiller
bda5ff4213 update other value/const check for array indexing 2012-11-30 16:28:09 +01:00
Wolfgang (Blub) Bumiller
696a8629b3 Don't treat initialized non-consts as static array indices 2012-11-30 16:25:18 +01:00
Wolfgang (Blub) Bumiller
6acd159c9c Keeping track of numbers for debugging 2012-11-30 16:23:42 +01:00
Wolfgang (Blub) Bumiller
9f1aa1490a out-of-bounds indexing check on static array indexing 2012-11-30 16:23:34 +01:00
Wolfgang (Blub) Bumiller
44cbf40553 We can now reintroduce the 'preprocessor-directives only after newlines' rule correctly 2012-11-30 15:53:53 +01:00
Wolfgang (Blub) Bumiller
f1a36ca647 Ignore modelgen commands with lex->flags.preprocessing 2012-11-30 15:44:45 +01:00
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