]> git.rm.cloudns.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
11 years agoDon't add redeclared globals a second time
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:35:31 +0000 (23:35 +0100)]
Don't add redeclared globals a second time

11 years agomore verbose errors in the ast when an ir-create fails
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:32:00 +0000 (23:32 +0100)]
more verbose errors in the ast when an ir-create fails

11 years agoAnother case for -fassign-function-types
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:28:47 +0000 (23:28 +0100)]
Another case for -fassign-function-types

11 years agointroducing -fassign-function-types, previously guarded by std==qcc this is now the...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:27:48 +0000 (23:27 +0100)]
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

11 years agofix a lexer error which parsed !! as one operator
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:24:39 +0000 (23:24 +0100)]
fix a lexer error which parsed !! as one operator

11 years ago__builtin_debug_printtype directive... helped me down tracking a bug: parsing typedef...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:57:11 +0000 (22:57 +0100)]
__builtin_debug_printtype directive... helped me down tracking a bug: parsing typedeffed types in parameter lists properly now

11 years agoOnly check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:40:35 +0000 (22:40 +0100)]
Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc doesn't either... grrr

11 years agoactually handle unary plus...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:38:52 +0000 (22:38 +0100)]
actually handle unary plus...

11 years agoAllow float constants which start with a dot
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:35:41 +0000 (22:35 +0100)]
Allow float constants which start with a dot

11 years agoAh right, 'var' is not an actual keyword, support TOKEN_IDENT-var inside functions
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:26:28 +0000 (22:26 +0100)]
Ah right, 'var' is not an actual keyword, support TOKEN_IDENT-var inside functions

11 years agoUse the correct default cv-qualifier on locals
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:16:08 +0000 (22:16 +0100)]
Use the correct default cv-qualifier on locals

11 years agoAllow 'var' in functions... even there initialized locals seem to be constant by...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:15:08 +0000 (22:15 +0100)]
Allow 'var' in functions... even there initialized locals seem to be constant by default... laaaaaaaame

11 years agoFix the testsuite to properly error on failed loads
Dale Weiler [Sun, 25 Nov 2012 21:12:04 +0000 (21:12 +0000)]
Fix the testsuite to properly error on failed loads

11 years agohandling TOKEN_CHARCONST - -Wmultibyte-character
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:11:21 +0000 (22:11 +0100)]
handling TOKEN_CHARCONST - -Wmultibyte-character

11 years agoActually use TOKEN_CHARCONST in the lexer...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:04:27 +0000 (22:04 +0100)]
Actually use TOKEN_CHARCONST in the lexer...

11 years agoDon't error about creating an unreachable statement if the node we're about to genera...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:59:57 +0000 (21:59 +0100)]
Don't error about creating an unreachable statement if the node we're about to generate is an ast_label

11 years agoFilling up remaining gotos at the end of a function for when the label is defined...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:56:38 +0000 (21:56 +0100)]
Filling up remaining gotos at the end of a function for when the label is defined after the goto; erroring for missing labels

11 years agomaking goto a keyword
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:56:21 +0000 (21:56 +0100)]
making goto a keyword

11 years agoparsing goto
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:53:14 +0000 (21:53 +0100)]
parsing goto

11 years agoAdd the array tests, seem to have forgotten to add those...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:41:30 +0000 (21:41 +0100)]
Add the array tests, seem to have forgotten to add those...

11 years agoSupport codegen of ast_label and ast_goto in any order
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:40:26 +0000 (21:40 +0100)]
Support codegen of ast_label and ast_goto in any order

11 years agoast_label, and labels later used for goto
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:27:14 +0000 (21:27 +0100)]
ast_label, and labels later used for goto

11 years agotemporarily disable the 'constant' flag when parsing the initializer to avoid the...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:10:43 +0000 (21:10 +0100)]
temporarily disable the 'constant' flag when parsing the initializer to avoid the 'assigning to constant' error in a block-local constant

11 years agoAllow 'const' within function bodies
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:08:30 +0000 (21:08 +0100)]
Allow 'const' within function bodies

11 years agoFix linecounting mistake in try_digraph
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 20:07:03 +0000 (21:07 +0100)]
Fix linecounting mistake in try_digraph

11 years agoSet the output to NULL always before parsing stuff
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 19:48:06 +0000 (20:48 +0100)]
Set the output to NULL always before parsing stuff

11 years agofix wrong parameter order in parse_variable calls, dammit I hate how 'bool' and ...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 19:29:12 +0000 (20:29 +0100)]
fix wrong parameter order in parse_variable calls, dammit I hate how 'bool' and 'int' are implicitly convertible here

11 years agomore on CV_CONST/CV_VAR, initializers to check 'constant' not just 'hasvalue'
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 19:25:39 +0000 (20:25 +0100)]
more on CV_CONST/CV_VAR, initializers to check 'constant' not just 'hasvalue'

11 years agoconst/variable qualifier flag for parse_variable
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 19:22:47 +0000 (20:22 +0100)]
const/variable qualifier flag for parse_variable

11 years agoAllow dangling semicolons for now
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 19:18:40 +0000 (20:18 +0100)]
Allow dangling semicolons for now

11 years agoa '(void)' parameter list does not mean 1 parameter of type void, but empty... xonoti...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 18:44:21 +0000 (19:44 +0100)]
a '(void)' parameter list does not mean 1 parameter of type void, but empty... xonotic needs this

11 years agofixed: -frelaxed-switch check was in the wrong position
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 18:42:16 +0000 (19:42 +0100)]
fixed: -frelaxed-switch check was in the wrong position

11 years agoassignment to constant error
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 18:37:31 +0000 (19:37 +0100)]
assignment to constant error

11 years agoconstant flag, -finitialized-nonconstants to turn initialized globals into mutable...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 18:35:00 +0000 (19:35 +0100)]
constant flag, -finitialized-nonconstants to turn initialized globals into mutable variables

11 years agoast: isconst->hasvalue, const keyword will set the const flag
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 18:30:10 +0000 (19:30 +0100)]
ast: isconst->hasvalue, const keyword will set the const flag

11 years agoParse the 'not' keyword in if as TOKEN_IDENT
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 18:20:00 +0000 (19:20 +0100)]
Parse the 'not' keyword in if as TOKEN_IDENT

11 years agoSome side-effect propagation for better warnings, so that comma-operators with assign...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 18:19:36 +0000 (19:19 +0100)]
Some side-effect propagation for better warnings, so that comma-operators with assignments in them don't cause the -Weffectless-statement warning, and fixing ternary precedence for fte operator list

11 years agoAllow regular AND used on non-float types
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:56:22 +0000 (18:56 +0100)]
Allow regular AND used on non-float types

11 years agoAllow strings to contain a backslash and a newline at the end
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:38:04 +0000 (18:38 +0100)]
Allow strings to contain a backslash and a newline at the end

11 years agoGuard translatable strings by -ftranslatable-strings, defaults to ON with -std=fteqcc
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:25:01 +0000 (18:25 +0100)]
Guard translatable strings by -ftranslatable-strings, defaults to ON with -std=fteqcc

11 years agoupdate noops flag while parsing a translatable string
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:23:48 +0000 (18:23 +0100)]
update noops flag while parsing a translatable string

11 years agoTranslatable string constants
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:22:00 +0000 (18:22 +0100)]
Translatable string constants

11 years agoparser_const_string can now create a translatable string
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:17:08 +0000 (18:17 +0100)]
parser_const_string can now create a translatable string

11 years agolinecounting fix for push/pop(line) pragmas
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:13:46 +0000 (18:13 +0100)]
linecounting fix for push/pop(line) pragmas

11 years agoLet's not have + and - as sole token, always allow ++ and -- to become operators...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:07:19 +0000 (18:07 +0100)]
Let's not have + and - as sole token, always allow ++ and -- to become operators independent of the noops flag

11 years agolinecounting...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 17:02:54 +0000 (18:02 +0100)]
linecounting...

11 years agolinecounting issue in the lexer
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 16:50:31 +0000 (17:50 +0100)]
linecounting issue in the lexer

11 years agoFix a bug in the lexer causing double-dots to double the character after the 2nd dot
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 16:43:24 +0000 (17:43 +0100)]
Fix a bug in the lexer causing double-dots to double the character after the 2nd dot

11 years agoFix parsing of multi-dot field types
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 16:43:13 +0000 (17:43 +0100)]
Fix parsing of multi-dot field types

11 years agomultiple dots to start a field type, ie ..float for a fieldpointer field
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 16:37:54 +0000 (17:37 +0100)]
multiple dots to start a field type, ie ..float for a fieldpointer field

11 years agomoving cleanvar=false out of a condition
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 15:20:22 +0000 (16:20 +0100)]
moving cleanvar=false out of a condition

11 years agolinecounting issues in the ftepp
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 15:08:41 +0000 (16:08 +0100)]
linecounting issues in the ftepp

11 years agoa more verbose error
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:58:10 +0000 (15:58 +0100)]
a more verbose error

11 years ago-Wconst-var
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:56:13 +0000 (15:56 +0100)]
-Wconst-var

11 years agoFixing propogate->propAgate typo in test.c
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:39:49 +0000 (15:39 +0100)]
Fixing propogate->propAgate typo in test.c

11 years agos/succeed/succeeded/
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:36:20 +0000 (15:36 +0100)]
s/succeed/succeeded/

11 years agoSimplify some condition in the tester
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:35:04 +0000 (15:35 +0100)]
Simplify some condition in the tester

11 years agoTypedef testcases
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:33:03 +0000 (15:33 +0100)]
Typedef testcases

11 years agofree the _locals vector
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:31:26 +0000 (15:31 +0100)]
free the _locals vector

11 years agoFix a missing uninitialized value which caused typedefs within functions to cause...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:30:31 +0000 (15:30 +0100)]
Fix a missing uninitialized value which caused typedefs within functions to cause a segfault

11 years agoAllow typedefs to shadow defs of previous scopes
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:25:19 +0000 (15:25 +0100)]
Allow typedefs to shadow defs of previous scopes

11 years agoImplementing typedef
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:21:52 +0000 (15:21 +0100)]
Implementing typedef

11 years agofixing a leak in the hashtables, htdel didn't delete the hash_node_t entries
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 14:12:16 +0000 (15:12 +0100)]
fixing a leak in the hashtables, htdel didn't delete the hash_node_t entries

11 years agotypedef is now a keyword
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 13:29:59 +0000 (14:29 +0100)]
typedef is now a keyword

11 years agoalways define GMQCC, never define FTEQCC or QCC, but have __STD_FTEQCC__ and the...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 13:29:06 +0000 (14:29 +0100)]
always define GMQCC, never define FTEQCC or QCC, but have __STD_FTEQCC__ and the likes for -std=qcc/gmqcc/fteqcc

11 years agoRevert "Fix type punning warnings"
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 13:05:10 +0000 (14:05 +0100)]
Revert "Fix type punning warnings"
it's a gcc version issue...

This reverts commit 3e6d173e31cf351b12262a14c053d82a214c0b36.

11 years agoFix type punning warnings
Dale Weiler [Sun, 25 Nov 2012 12:57:28 +0000 (12:57 +0000)]
Fix type punning warnings

11 years agoFix some uninitialized values
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 12:55:29 +0000 (13:55 +0100)]
Fix some uninitialized values

11 years agouse the hashtables in the IR
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 12:37:54 +0000 (13:37 +0100)]
use the hashtables in the IR

11 years agoremoving ir_function_get_local - it's unused
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 12:33:00 +0000 (13:33 +0100)]
removing ir_function_get_local - it's unused

11 years agoChange the parser to use the hashtable functions
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 12:23:37 +0000 (13:23 +0100)]
Change the parser to use the hashtable functions

11 years agoSome hashtable changes
Dale Weiler [Sat, 24 Nov 2012 21:46:28 +0000 (21:46 +0000)]
Some hashtable changes

11 years agoYou made substantial changes to this file, you get a name :P
Dale Weiler [Sat, 24 Nov 2012 21:23:21 +0000 (21:23 +0000)]
You made substantial changes to this file, you get a name :P

11 years agoAdd respective license headers + some cleanups
Dale Weiler [Sat, 24 Nov 2012 21:22:35 +0000 (21:22 +0000)]
Add respective license headers + some cleanups

11 years agoWhitespace
Dale Weiler [Sat, 24 Nov 2012 20:33:03 +0000 (20:33 +0000)]
Whitespace

11 years agoSet correct macro for PP based on the selected standard
Dale Weiler [Sat, 24 Nov 2012 00:37:36 +0000 (00:37 +0000)]
Set correct macro for PP based on the selected standard

11 years agoImplemented -W? and -f? as aliases to -Whelp and -fhelp
Dale Weiler [Sat, 24 Nov 2012 00:29:30 +0000 (00:29 +0000)]
Implemented -W? and -f? as aliases to -Whelp and -fhelp

11 years agoImplemented -show-defaults
Dale Weiler [Sat, 24 Nov 2012 00:26:25 +0000 (00:26 +0000)]
Implemented -show-defaults

11 years ago-Wdouble-declaration on by default
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 22:44:35 +0000 (23:44 +0100)]
-Wdouble-declaration on by default

11 years agoturn the message about global variable double-declaration into a warning instead...
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 21:30:35 +0000 (22:30 +0100)]
turn the message about global variable double-declaration into a warning instead of an error on std != gmqcc

11 years agowarn about double function declarations...
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 21:22:22 +0000 (22:22 +0100)]
warn about double function declarations...

11 years agoA nice internal error
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 21:15:17 +0000 (22:15 +0100)]
A nice internal error

11 years ago'var' is now no keyword anymore, :\
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 21:07:35 +0000 (22:07 +0100)]
'var' is now no keyword anymore, :\

11 years agohandling 'const' - still need correct separation of constant and just initialized...
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 20:52:16 +0000 (21:52 +0100)]
handling 'const' - still need correct separation of constant and just initialized later when we distinguish between them

11 years agopreserve newlines in preprocessed multiline comments
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 20:47:00 +0000 (21:47 +0100)]
preserve newlines in preprocessed multiline comments

11 years agoAdding an unrecognized keywords error
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 20:41:50 +0000 (21:41 +0100)]
Adding an unrecognized keywords error

11 years agoFix a very nasty bug in the lexer's handling of comments
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 20:35:14 +0000 (21:35 +0100)]
Fix a very nasty bug in the lexer's handling of comments

11 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Fri, 23 Nov 2012 20:06:11 +0000 (20:06 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

11 years agoAdded comment about hashtable
Dale Weiler [Fri, 23 Nov 2012 20:05:53 +0000 (20:05 +0000)]
Added comment about hashtable

11 years agorelation operation in #if just as wrong as in fteqcc
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 20:04:57 +0000 (21:04 +0100)]
relation operation in #if just as wrong as in fteqcc

11 years agoNo copy, just store pointer for hash table
Dale Weiler [Fri, 23 Nov 2012 20:01:58 +0000 (20:01 +0000)]
No copy, just store pointer for hash table

11 years agoEnforce a trailing nul-byte after preprocessing
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 18:34:24 +0000 (19:34 +0100)]
Enforce a trailing nul-byte after preprocessing

11 years agoDon't ftepp_warn after destroying the lexer...
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 18:30:02 +0000 (19:30 +0100)]
Don't ftepp_warn after destroying the lexer...

11 years agoLook for include files in the currently #included file's directory first
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 18:29:45 +0000 (19:29 +0100)]
Look for include files in the currently #included file's directory first

11 years agoLet's #define GMQCC by default
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 18:13:09 +0000 (19:13 +0100)]
Let's #define GMQCC by default

11 years agoDon't delete the ftepp prematurely
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 14:03:10 +0000 (15:03 +0100)]
Don't delete the ftepp prematurely

11 years agoftepp_out can return a nullptr
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 13:59:56 +0000 (14:59 +0100)]
ftepp_out can return a nullptr

11 years agooperator &~=
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 13:39:05 +0000 (14:39 +0100)]
operator &~=

11 years agooperators &= and |=
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 13:28:11 +0000 (14:28 +0100)]
operators &= and |=

11 years ago*= and /= operators
Wolfgang (Blub) Bumiller [Fri, 23 Nov 2012 13:24:58 +0000 (14:24 +0100)]
*= and /= operators