cparser
15 years agoSpell the option -Wpointer-arith, not -Wpointer_arith.
Christoph Mallon [Mon, 15 Sep 2008 08:47:29 +0000 (08:47 +0000)]
Spell the option -Wpointer-arith, not -Wpointer_arith.

[r21957]

15 years agoFix warn_div_by_zero(): The result of the division might be int and the divisor non...
Christoph Mallon [Mon, 15 Sep 2008 07:56:36 +0000 (07:56 +0000)]
Fix warn_div_by_zero(): The result of the division might be int and the divisor non-int for /=.

[r21956]

15 years agoSpell the option -Wdiv-by-zero, not -Wdiv_by_zero.
Christoph Mallon [Mon, 15 Sep 2008 07:36:41 +0000 (07:36 +0000)]
Spell the option -Wdiv-by-zero, not -Wdiv_by_zero.

[r21955]

15 years agoFor an array access being an object with constant address, the array reference may...
Christoph Mallon [Mon, 15 Sep 2008 07:29:36 +0000 (07:29 +0000)]
For an array access being an object with constant address, the array reference may be object with constant address.

[r21954]

15 years agoDeMorganise.
Christoph Mallon [Mon, 15 Sep 2008 07:21:37 +0000 (07:21 +0000)]
DeMorganise.

[r21953]

15 years agoHandle the case when array access results in an address constant.
Christoph Mallon [Sun, 14 Sep 2008 21:49:41 +0000 (21:49 +0000)]
Handle the case when array access results in an address constant.

[r21952]

15 years agoCorrect and simplify the logic for -Wconversion.
Christoph Mallon [Sun, 14 Sep 2008 21:18:15 +0000 (21:18 +0000)]
Correct and simplify the logic for -Wconversion.

[r21951]

15 years agoFix warning message.
Christoph Mallon [Sun, 14 Sep 2008 18:29:21 +0000 (18:29 +0000)]
Fix warning message.

[r21950]

15 years agoPrevent errors about non-constant case labels in some common cases of prior errors...
Christoph Mallon [Sun, 14 Sep 2008 18:21:03 +0000 (18:21 +0000)]
Prevent errors about non-constant case labels in some common cases of prior errors while parsing the expression.

[r21949]

15 years agoPrevent stray error messages by pretending invalid references are address constants.
Christoph Mallon [Sun, 14 Sep 2008 17:50:19 +0000 (17:50 +0000)]
Prevent stray error messages by pretending invalid references are address constants.

[r21948]

15 years agoHandle the error type in descend_into_subtype().
Christoph Mallon [Sun, 14 Sep 2008 17:48:29 +0000 (17:48 +0000)]
Handle the error type in descend_into_subtype().

[r21947]

15 years agoHandle the error type in get_qualified_type().
Christoph Mallon [Sun, 14 Sep 2008 17:47:08 +0000 (17:47 +0000)]
Handle the error type in get_qualified_type().

[r21946]

15 years agoFix off-by-one error in source position in diagnostic messages in parse_reference().
Christoph Mallon [Sun, 14 Sep 2008 17:10:02 +0000 (17:10 +0000)]
Fix off-by-one error in source position in diagnostic messages in parse_reference().

[r21945]

15 years agoPretend the error type is compatible with every type, to suppress stray errors. ...
Christoph Mallon [Sun, 14 Sep 2008 16:58:33 +0000 (16:58 +0000)]
Pretend the error type is compatible with every type, to suppress stray errors.  Also prevent some warnings later on when a error declaration was generated and a proper declaration follows.

[r21944]

15 years agoCreate AST for select expressions even if the LHS has incomplete type.
Christoph Mallon [Sun, 14 Sep 2008 15:45:52 +0000 (15:45 +0000)]
Create AST for select expressions even if the LHS has incomplete type.

[r21943]

15 years ago- Ugly fix: MSVC runtime does not support long double printing, cast to double yet
Michael Beck [Sun, 14 Sep 2008 15:30:43 +0000 (15:30 +0000)]
- Ugly fix: MSVC runtime does not support long double printing, cast to double yet

[r21942]

15 years agoHandle typerefs in get_qualified_type().
Christoph Mallon [Sun, 14 Sep 2008 15:16:20 +0000 (15:16 +0000)]
Handle typerefs in get_qualified_type().

[r21941]

15 years agoFix parsing of function declarations with redundant parentheses around the declarator...
Christoph Mallon [Sun, 14 Sep 2008 15:12:27 +0000 (15:12 +0000)]
Fix parsing of function declarations with redundant parentheses around the declarator name.

[r21940]

15 years agoFix printing of function types, which return function pointers: The parameter lists...
Christoph Mallon [Sun, 14 Sep 2008 15:01:15 +0000 (15:01 +0000)]
Fix printing of function types, which return function pointers: The parameter lists got swapped.

[r21939]

15 years agoThe result of a select expression is never a constant pointer (rather address), but...
Christoph Mallon [Sun, 14 Sep 2008 12:00:20 +0000 (12:00 +0000)]
The result of a select expression is never a constant pointer (rather address), but always an object (it could be a object with pointer type, but this is still an object, not an addresss).

[r21938]

15 years agoThe result of an array access never is a constant expression.
Christoph Mallon [Sun, 14 Sep 2008 11:12:10 +0000 (11:12 +0000)]
The result of an array access never is a constant expression.

[r21937]

15 years ago- implemented local labels
Michael Beck [Sun, 14 Sep 2008 03:13:48 +0000 (03:13 +0000)]
- implemented local labels

[r21936]

15 years ago- fixed printing of labels
Michael Beck [Sun, 14 Sep 2008 02:29:06 +0000 (02:29 +0000)]
- fixed printing of labels

[r21935]

15 years ago- use the intel math library if compiled by the intel compiler
Michael Beck [Sun, 14 Sep 2008 01:20:43 +0000 (01:20 +0000)]
- use the intel math library if compiled by the intel compiler

[r21934]

15 years ago- add missing cases
Michael Beck [Sun, 14 Sep 2008 00:58:04 +0000 (00:58 +0000)]
- add missing cases

[r21933]

15 years ago- implemented computed goto
Michael Beck [Sun, 14 Sep 2008 00:51:19 +0000 (00:51 +0000)]
- implemented computed goto

[r21932]

15 years agoReplace some fprintf()s by the simpler fput{c,s}().
Christoph Mallon [Sat, 13 Sep 2008 18:34:55 +0000 (18:34 +0000)]
Replace some fprintf()s by the simpler fput{c,s}().

[r21931]

15 years ago- prints correctly computed goto
Michael Beck [Sat, 13 Sep 2008 18:12:13 +0000 (18:12 +0000)]
- prints correctly computed goto
- removed (old?) debugging output to stderr

[r21930]

15 years ago- started implementation of size and alignment for types
Michael Beck [Sat, 13 Sep 2008 18:09:19 +0000 (18:09 +0000)]
- started implementation of size and alignment for types
- implemented -Wpacked, -Wpadded

[r21929]

15 years agoAdd get_qualified_type() and solve several problem with missing qualifiers, which...
Christoph Mallon [Sat, 13 Sep 2008 12:33:42 +0000 (12:33 +0000)]
Add get_qualified_type() and solve several problem with missing qualifiers, which lead to accepting incorrect code.

[r21928]

15 years agoRemove dead code.
Christoph Mallon [Sat, 13 Sep 2008 11:20:31 +0000 (11:20 +0000)]
Remove dead code.

[r21927]

15 years agoPreserve type qualifiers in parse_select_expression().
Christoph Mallon [Sat, 13 Sep 2008 11:20:23 +0000 (11:20 +0000)]
Preserve type qualifiers in parse_select_expression().

[r21926]

15 years agoSmall cleanup in parse_select_expression(), print unskipped type.
Christoph Mallon [Sat, 13 Sep 2008 11:02:05 +0000 (11:02 +0000)]
Small cleanup in parse_select_expression(), print unskipped type.

[r21925]

15 years agoPrevent null pointer access, when printing error about parameter of incomplete type...
Christoph Mallon [Sat, 13 Sep 2008 10:26:59 +0000 (10:26 +0000)]
Prevent null pointer access, when printing error about parameter of incomplete type, if the parameter has no name.

[r21924]

15 years agoPrevent warning about incompatible types when initializing a function like a variable...
Christoph Mallon [Sat, 13 Sep 2008 10:20:44 +0000 (10:20 +0000)]
Prevent warning about incompatible types when initializing a function like a variable.  Only show the error message (which is also slightly improved).

[r21923]

15 years agoReject initialisation of k&r parameter declarations and correct warnings about redund...
Christoph Mallon [Sat, 13 Sep 2008 10:07:50 +0000 (10:07 +0000)]
Reject initialisation of k&r parameter declarations and correct warnings about redundant declarations.

[r21922]

15 years agoRemove the parameter finished_declaration, which is the same for all callers, from...
Christoph Mallon [Sat, 13 Sep 2008 05:49:40 +0000 (05:49 +0000)]
Remove the parameter finished_declaration, which is the same for all callers, from parse_anonymous_declaration_rest().

[r21921]

15 years ago- implemented -Wold-style-definition
Michael Beck [Sat, 13 Sep 2008 00:03:47 +0000 (00:03 +0000)]
- implemented -Wold-style-definition

[r21920]

15 years agotestcase for -Wtraditional
Michael Beck [Fri, 12 Sep 2008 23:47:13 +0000 (23:47 +0000)]
testcase for -Wtraditional

[r21919]

15 years ago- implemented most cases of -W traditional (preprocessor missing)
Michael Beck [Fri, 12 Sep 2008 23:45:34 +0000 (23:45 +0000)]
- implemented most cases of -W traditional (preprocessor missing)
- implemented most cases of -Wconversion

[r21918]

15 years agoadded is_type_complex()
Michael Beck [Fri, 12 Sep 2008 22:54:57 +0000 (22:54 +0000)]
added is_type_complex()

[r21917]

15 years agoadd %u specifier
Michael Beck [Fri, 12 Sep 2008 22:38:48 +0000 (22:38 +0000)]
add %u specifier

[r21916]

15 years ago- simplified nested #ifdef's
Michael Beck [Fri, 12 Sep 2008 21:46:45 +0000 (21:46 +0000)]
- simplified nested #ifdef's

[r21915]

15 years ago- implemented -Winit-self
Michael Beck [Fri, 12 Sep 2008 21:45:15 +0000 (21:45 +0000)]
- implemented -Winit-self

[r21914]

15 years ago- typo fixed
Michael Beck [Fri, 12 Sep 2008 21:23:37 +0000 (21:23 +0000)]
- typo fixed

[r21912]

15 years agoMake program logic a bit clearer by using a flag.
Christoph Mallon [Fri, 12 Sep 2008 20:26:44 +0000 (20:26 +0000)]
Make program logic a bit clearer by using a flag.

[r21911]

15 years agoSlightly improve diagnostic message when accidently using . instead of ->.
Christoph Mallon [Fri, 12 Sep 2008 20:14:57 +0000 (20:14 +0000)]
Slightly improve diagnostic message when accidently using . instead of ->.

[r21910]

15 years agoDo not split string literals.
Christoph Mallon [Fri, 12 Sep 2008 20:02:38 +0000 (20:02 +0000)]
Do not split string literals.

[r21909]

15 years agoUse given storage class as declared storage class in create_error_declaration().
Christoph Mallon [Fri, 12 Sep 2008 20:02:24 +0000 (20:02 +0000)]
Use given storage class as declared storage class in create_error_declaration().

[r21908]

15 years agoRemove the unnecessary attribute symbol from struct select_expression_t.
Christoph Mallon [Fri, 12 Sep 2008 19:46:47 +0000 (19:46 +0000)]
Remove the unnecessary attribute symbol from struct select_expression_t.

[r21907]

15 years agoCreate AST for select expressions even if the LHS is unknown or has the wrong type.
Christoph Mallon [Fri, 12 Sep 2008 19:44:24 +0000 (19:44 +0000)]
Create AST for select expressions even if the LHS is unknown or has the wrong type.

[r21906]

15 years agoCreate a declaration, when accessing a non-existent compound entry, so the AST contai...
Christoph Mallon [Fri, 12 Sep 2008 19:11:29 +0000 (19:11 +0000)]
Create a declaration, when accessing a non-existent compound entry, so the AST contains something sensible.

[r21905]

15 years agoCheck whether the operand of ++/-- is an lvalue.
Christoph Mallon [Fri, 12 Sep 2008 18:30:06 +0000 (18:30 +0000)]
Check whether the operand of ++/-- is an lvalue.

[r21904]

15 years agoCorrect precedence of call expressions for printing.
Christoph Mallon [Fri, 12 Sep 2008 18:19:48 +0000 (18:19 +0000)]
Correct precedence of call expressions for printing.

[r21903]

15 years agoCorrect precedence for printing ?:.
Christoph Mallon [Fri, 12 Sep 2008 18:01:06 +0000 (18:01 +0000)]
Correct precedence for printing ?:.

[r21902]

15 years agoDo not split string literals.
Christoph Mallon [Fri, 12 Sep 2008 17:21:15 +0000 (17:21 +0000)]
Do not split string literals.

[r21901]

15 years agoHandle __try and __leave in check_{,un}reachable().
Christoph Mallon [Fri, 12 Sep 2008 17:16:14 +0000 (17:16 +0000)]
Handle __try and __leave in check_{,un}reachable().

[r21900]

15 years agoCreate a few less invalid statements on parse errors.
Christoph Mallon [Fri, 12 Sep 2008 14:35:41 +0000 (14:35 +0000)]
Create a few less invalid statements on parse errors.

[r21899]

15 years agoPrint constant suffixes and properly print floats.
Christoph Mallon [Fri, 12 Sep 2008 14:18:20 +0000 (14:18 +0000)]
Print constant suffixes and properly print floats.

[r21898]

15 years agoMark internal typedefs as "implicit", so the AST-printer does not show them.
Christoph Mallon [Fri, 12 Sep 2008 12:44:42 +0000 (12:44 +0000)]
Mark internal typedefs as "implicit", so the AST-printer does not show them.

[r21897]

15 years agoOnly assume it is a k&r-declaration, if the unknown identifier in the parameter list...
Christoph Mallon [Fri, 12 Sep 2008 12:33:42 +0000 (12:33 +0000)]
Only assume it is a k&r-declaration, if the unknown identifier in the parameter list is followed by a , or ).  This leads to better error messages.

[r21896]

15 years agoremoved yet unused asm_string
Michael Beck [Fri, 12 Sep 2008 11:23:04 +0000 (11:23 +0000)]
removed yet unused asm_string

[r21895]

15 years ago- BugFix: print cast errors on the position of the cast
Michael Beck [Fri, 12 Sep 2008 11:14:25 +0000 (11:14 +0000)]
- BugFix: print cast errors on the position of the cast
- semantic_cast() should return an error so it's possible to record it
- add missing cast

[r21894]

15 years agoPrint a " " after the ")" of for-statements.
Christoph Mallon [Fri, 12 Sep 2008 10:25:33 +0000 (10:25 +0000)]
Print a " " after the ")" of for-statements.

[r21892]

15 years agoBe more tolerant when encountering unknown identifiers while parsing and create a...
Christoph Mallon [Fri, 12 Sep 2008 10:21:42 +0000 (10:21 +0000)]
Be more tolerant when encountering unknown identifiers while parsing and create a fake declaration for them.

[r21891]

15 years agoDo not show implicit declarations in --print-ast.
Christoph Mallon [Fri, 12 Sep 2008 10:18:53 +0000 (10:18 +0000)]
Do not show implicit declarations in --print-ast.

[r21890]

15 years agobool, indendation.
Christoph Mallon [Fri, 12 Sep 2008 09:13:36 +0000 (09:13 +0000)]
bool, indendation.

[r21889]

15 years agoRecord destination type and expression of a cast, even if the semantic check fails.
Christoph Mallon [Fri, 12 Sep 2008 07:10:12 +0000 (07:10 +0000)]
Record destination type and expression of a cast, even if the semantic check fails.

[r21888]

15 years agoIndentation.
Christoph Mallon [Fri, 12 Sep 2008 06:52:46 +0000 (06:52 +0000)]
Indentation.

[r21887]

15 years agoRename orig_type to src_type in semantic_cast(), to avoid confusion with the usual...
Christoph Mallon [Fri, 12 Sep 2008 06:51:13 +0000 (06:51 +0000)]
Rename orig_type to src_type in semantic_cast(), to avoid confusion with the usual meaning (unskipped type) of "orig".

[r21886]

15 years agoRemove else-if-chain in semantic_cast(), because it leads to omission of errors,...
Christoph Mallon [Fri, 12 Sep 2008 06:49:10 +0000 (06:49 +0000)]
Remove else-if-chain in semantic_cast(), because it leads to omission of errors, when the destination type is a pointer type.

[r21885]

15 years agoStill print some errors even if invalid types are involved in semantic_cast().
Christoph Mallon [Fri, 12 Sep 2008 06:44:17 +0000 (06:44 +0000)]
Still print some errors even if invalid types are involved in semantic_cast().

[r21884]

15 years agoPrint source position of expression instead of HERE in semantic_cast().
Christoph Mallon [Fri, 12 Sep 2008 06:41:50 +0000 (06:41 +0000)]
Print source position of expression instead of HERE in semantic_cast().

[r21883]

15 years agoIndentation.
Christoph Mallon [Fri, 12 Sep 2008 06:41:02 +0000 (06:41 +0000)]
Indentation.

[r21882]

15 years agoSort.
Christoph Mallon [Fri, 12 Sep 2008 06:34:46 +0000 (06:34 +0000)]
Sort.

[r21881]

15 years agoskip_typeref().
Christoph Mallon [Fri, 12 Sep 2008 06:25:37 +0000 (06:25 +0000)]
skip_typeref().

[r21880]

15 years agoReduce code duplication.
Christoph Mallon [Fri, 12 Sep 2008 06:04:41 +0000 (06:04 +0000)]
Reduce code duplication.

[r21879]

15 years agotest for nested comments
Michael Beck [Fri, 12 Sep 2008 04:37:50 +0000 (04:37 +0000)]
test for nested comments

[r21878]

15 years ago- implemented -Wcomment (currently non-working because cpp filters all
Michael Beck [Fri, 12 Sep 2008 04:35:50 +0000 (04:35 +0000)]
- implemented -Wcomment (currently non-working because cpp filters all
  comments)

[r21877]

15 years agoadd some more (unimplemented) warnings
Michael Beck [Fri, 12 Sep 2008 04:23:23 +0000 (04:23 +0000)]
add some more (unimplemented) warnings

[r21876]

15 years agotest program for cast errors
Michael Beck [Fri, 12 Sep 2008 03:31:49 +0000 (03:31 +0000)]
test program for cast errors

[r21875]

15 years ago- removed todo
Michael Beck [Fri, 12 Sep 2008 03:31:00 +0000 (03:31 +0000)]
- removed todo

[r21874]

15 years ago- -Wcast-qual implemented
Michael Beck [Fri, 12 Sep 2008 03:30:36 +0000 (03:30 +0000)]
- -Wcast-qual implemented
- fixed semantic_assign() error messages
- implemented semantic_cast()

[r21873]

15 years ago- do not print a space at the end of qualifiers (needed for diagnostic)
Michael Beck [Fri, 12 Sep 2008 02:22:38 +0000 (02:22 +0000)]
- do not print a space at the end of qualifiers (needed for diagnostic)

[r21872]

15 years ago-Waggregate-return implemented
Michael Beck [Fri, 12 Sep 2008 01:36:36 +0000 (01:36 +0000)]
-Waggregate-return implemented

[r21871]

15 years agoadd test for padding
Michael Beck [Fri, 12 Sep 2008 01:11:49 +0000 (01:11 +0000)]
add test for padding

[r21870]

15 years agoimplemented -Wdiv-by-zero
Michael Beck [Thu, 11 Sep 2008 23:58:37 +0000 (23:58 +0000)]
implemented -Wdiv-by-zero

[r21866]

15 years agoset the stack alignment to 2^4 on apple
Michael Beck [Thu, 11 Sep 2008 23:24:14 +0000 (23:24 +0000)]
set the stack alignment to 2^4 on apple

[r21865]

15 years ago_Win32 build fix
Michael Beck [Thu, 11 Sep 2008 22:48:06 +0000 (22:48 +0000)]
_Win32 build fix

[r21861]

15 years agos/imature_blocks/immature_blocks/.
Christoph Mallon [Thu, 11 Sep 2008 11:38:01 +0000 (11:38 +0000)]
s/imature_blocks/immature_blocks/.

[r21843]

15 years agoUse new_Block() instead of new_immBlock(), when the number of CF predecessors is...
Christoph Mallon [Thu, 11 Sep 2008 11:36:59 +0000 (11:36 +0000)]
Use new_Block() instead of new_immBlock(), when the number of CF predecessors is known in advance.

[r21842]

15 years agoHandle DM_NORETURN in ast2firm.
Christoph Mallon [Thu, 11 Sep 2008 11:30:19 +0000 (11:30 +0000)]
Handle DM_NORETURN in ast2firm.

[r21840]

15 years agoIndentation.
Christoph Mallon [Thu, 11 Sep 2008 06:26:35 +0000 (06:26 +0000)]
Indentation.

[r21829]

15 years agowe need to keep_alive memory as well for potential endless loops
Matthias Braun [Wed, 10 Sep 2008 14:18:09 +0000 (14:18 +0000)]
we need to keep_alive memory as well for potential endless loops

[r21821]

15 years agoimplement hex floats
Matthias Braun [Wed, 10 Sep 2008 12:35:15 +0000 (12:35 +0000)]
implement hex floats

[r21819]

15 years agobuild right side of += etc. before left side
Matthias Braun [Tue, 9 Sep 2008 16:09:00 +0000 (16:09 +0000)]
build right side of += etc. before left side

[r21789]

15 years agoimproved "builtin"-strcmp
Michael Beck [Mon, 8 Sep 2008 10:12:43 +0000 (10:12 +0000)]
improved "builtin"-strcmp

[r21746]

15 years agorerun builtins.h creation if script changed
Michael Beck [Mon, 8 Sep 2008 09:48:14 +0000 (09:48 +0000)]
rerun builtins.h creation if script changed

[r21745]

15 years agofix
Matthias Braun [Mon, 8 Sep 2008 08:17:00 +0000 (08:17 +0000)]
fix

[r21744]

15 years agobunch of mac fixes and improvements
Matthias Braun [Sun, 7 Sep 2008 16:35:52 +0000 (16:35 +0000)]
bunch of mac fixes and improvements

[r21740]