cparser
15 years ago- further fixed r23189
Michael Beck [Mon, 27 Oct 2008 18:03:02 +0000 (18:03 +0000)]
- further fixed r23189

[r23242]

15 years agoFix anchor token underflow while parsing for-statements.
Christoph Mallon [Mon, 27 Oct 2008 15:44:09 +0000 (15:44 +0000)]
Fix anchor token underflow while parsing for-statements.

[r23236]

15 years agoParse sizeof(T){...} correctly, i.e. not sizeof type, but sizeof expression starting...
Christoph Mallon [Mon, 27 Oct 2008 15:40:15 +0000 (15:40 +0000)]
Parse sizeof(T){...} correctly, i.e. not sizeof type, but sizeof expression starting with a compound literal.

[r23234]

15 years agoAdd the C++ :: token.
Christoph Mallon [Mon, 27 Oct 2008 12:17:13 +0000 (12:17 +0000)]
Add the C++ :: token.

[r23226]

15 years agoParse and check semantic of delete expressions.
Christoph Mallon [Mon, 27 Oct 2008 11:40:23 +0000 (11:40 +0000)]
Parse and check semantic of delete expressions.

[r23225]

15 years agoC++ banned implicit int.
Christoph Mallon [Mon, 27 Oct 2008 11:08:09 +0000 (11:08 +0000)]
C++ banned implicit int.

[r23224]

15 years agoC++ does not allow assignment from a void pointer type to a non-void pointer type.
Christoph Mallon [Mon, 27 Oct 2008 11:00:18 +0000 (11:00 +0000)]
C++ does not allow assignment from a void pointer type to a non-void pointer type.

[r23223]

15 years agoC++ has not "tentative definitions".
Christoph Mallon [Mon, 27 Oct 2008 10:50:48 +0000 (10:50 +0000)]
C++ has not "tentative definitions".

[r23222]

15 years agoC++ function declarations with an empty parameter list denote no parameters instead...
Christoph Mallon [Mon, 27 Oct 2008 10:46:15 +0000 (10:46 +0000)]
C++ function declarations with an empty parameter list denote no parameters instead of unspecified parameters.

[r23221]

15 years agoParse and check semantic of throw expressions.
Christoph Mallon [Mon, 27 Oct 2008 10:32:09 +0000 (10:32 +0000)]
Parse and check semantic of throw expressions.

[r23220]

15 years agoRemove if, whose condition is never true.
Christoph Mallon [Mon, 27 Oct 2008 06:48:38 +0000 (06:48 +0000)]
Remove if, whose condition is never true.

[r23219]

15 years agoIn C++ (most) character literals are of type char.
Christoph Mallon [Sun, 26 Oct 2008 20:55:23 +0000 (20:55 +0000)]
In C++ (most) character literals are of type char.

[r23218]

15 years agoAdd C++ keywords.
Christoph Mallon [Sun, 26 Oct 2008 20:38:34 +0000 (20:38 +0000)]
Add C++ keywords.

[r23217]

15 years agoFirst bit of C++ support: Different precedence for ?:.
Christoph Mallon [Sun, 26 Oct 2008 19:49:53 +0000 (19:49 +0000)]
First bit of C++ support: Different precedence for ?:.

[r23216]

15 years agoAdd support for C++ in the compiler driver.
Christoph Mallon [Sun, 26 Oct 2008 19:48:46 +0000 (19:48 +0000)]
Add support for C++ in the compiler driver.

[r23215]

15 years agomore tests
Matthias Braun [Sun, 26 Oct 2008 18:44:46 +0000 (18:44 +0000)]
more tests

[r23214]

15 years agoslightly improve testcase
Matthias Braun [Sun, 26 Oct 2008 18:04:37 +0000 (18:04 +0000)]
slightly improve testcase

[r23213]

15 years agoConsistently name the directories should_*.
Christoph Mallon [Sun, 26 Oct 2008 17:54:17 +0000 (17:54 +0000)]
Consistently name the directories should_*.

[r23212]

15 years agocp_error050: sizeof a compound literal.
Christoph Mallon [Sun, 26 Oct 2008 17:50:49 +0000 (17:50 +0000)]
cp_error050: sizeof a compound literal.

[r23211]

15 years agoFix parsing of expression statements, which pointlessly start with sizeof or __aligno...
Christoph Mallon [Sun, 26 Oct 2008 17:46:08 +0000 (17:46 +0000)]
Fix parsing of expression statements, which pointlessly start with sizeof or __alignof__, and sort the case list.

[r23210]

15 years agofix typo
Matthias Braun [Sun, 26 Oct 2008 12:26:06 +0000 (12:26 +0000)]
fix typo

[r23207]

15 years agothis was not meant to be here
Matthias Braun [Sun, 26 Oct 2008 12:23:44 +0000 (12:23 +0000)]
this was not meant to be here

[r23206]

15 years agoChange -w so that warnings can be activated again later on.
Christoph Mallon [Sun, 26 Oct 2008 12:11:03 +0000 (12:11 +0000)]
Change -w so that warnings can be activated again later on.

[r23205]

15 years agomore warning testcases
Matthias Braun [Sun, 26 Oct 2008 12:02:46 +0000 (12:02 +0000)]
more warning testcases

[r23204]

15 years agosource-position doesn't make any sense for types:
Matthias Braun [Sun, 26 Oct 2008 10:03:16 +0000 (10:03 +0000)]
source-position doesn't make any sense for types:
- atomic, pointer, function types are used throughout the program and always
  defined "on-the-fly" it's not possible to assign a correct source_position
- for struct, union and enum types we have to create a declaration_t anyway
  so they can get referenced by their name. In this case we can and should
  use the source_position of the declaration

[r23203]

15 years agoPrefix operators need no precedence.
Christoph Mallon [Sun, 26 Oct 2008 08:30:31 +0000 (08:30 +0000)]
Prefix operators need no precedence.

[r23201]

15 years ago- crashes, but should give an error
Michael Beck [Sun, 26 Oct 2008 02:04:06 +0000 (02:04 +0000)]
- crashes, but should give an error

[r23200]

15 years ago- BugFix: gcc optimizes def_nr + 1 < 0 away, arg\!
Michael Beck [Sun, 26 Oct 2008 00:24:57 +0000 (00:24 +0000)]
- BugFix: gcc optimizes def_nr + 1 < 0 away, arg\!

[r23196]

15 years ago- BugFix: generation of default case number was completely broken
Michael Beck [Sun, 26 Oct 2008 00:08:44 +0000 (00:08 +0000)]
- BugFix: generation of default case number was completely broken

[r23195]

15 years ago- fixed r23189: the AST-printer doubles the precesion to have one free
Michael Beck [Sat, 25 Oct 2008 22:37:06 +0000 (22:37 +0000)]
- fixed r23189: the AST-printer doubles the precesion to have one free
  bit for right-to-left handling

[r23194]

15 years agoUnify the precedence lists of the parser and the AST printer.
Christoph Mallon [Sat, 25 Oct 2008 20:06:26 +0000 (20:06 +0000)]
Unify the precedence lists of the parser and the AST printer.

[r23189]

15 years agoimproved switch.c
Matthias Braun [Sat, 25 Oct 2008 19:42:22 +0000 (19:42 +0000)]
improved switch.c

[r23188]

15 years agoReplace magic numbers for expression precedences by an enum. Do not unnecessarily...
Christoph Mallon [Sat, 25 Oct 2008 19:26:26 +0000 (19:26 +0000)]
Replace magic numbers for expression precedences by an enum.  Do not unnecessarily pass the precedence to the expression parsers.

[r23184]

15 years agoget rid of some fields in ast_t: outer_fkt_jmp, is_outer_ref, is_parameter
Matthias Braun [Sat, 25 Oct 2008 17:10:15 +0000 (17:10 +0000)]
get rid of some fields in ast_t: outer_fkt_jmp, is_outer_ref, is_parameter

[r23181]

15 years agoFix some precedence stuff for expression parsing.
Christoph Mallon [Sat, 25 Oct 2008 17:01:13 +0000 (17:01 +0000)]
Fix some precedence stuff for expression parsing.

[r23180]

15 years agosome testcases I had lying around here
Matthias Braun [Sat, 25 Oct 2008 14:44:06 +0000 (14:44 +0000)]
some testcases I had lying around here

[r23179]

15 years agoWhile our semantics of _Bool are wrong, at least make it the right size (for most...
Christoph Mallon [Fri, 24 Oct 2008 17:30:32 +0000 (17:30 +0000)]
While our semantics of _Bool are wrong, at least make it the right size (for most platforms).

[r23175]

15 years agoUse make_pointer_type().
Christoph Mallon [Fri, 24 Oct 2008 17:26:56 +0000 (17:26 +0000)]
Use make_pointer_type().

[r23174]

15 years agoasm_name is not used
Matthias Braun [Thu, 23 Oct 2008 21:59:02 +0000 (21:59 +0000)]
asm_name is not used

[r23149]

15 years agoskip_typeref().
Christoph Mallon [Tue, 21 Oct 2008 10:11:07 +0000 (10:11 +0000)]
skip_typeref().

[r23060]

15 years agoImprove unused variable check.
Christoph Mallon [Tue, 21 Oct 2008 08:13:29 +0000 (08:13 +0000)]
Improve unused variable check.

[r23059]

15 years agoImprove unused variable check.
Christoph Mallon [Tue, 21 Oct 2008 06:11:05 +0000 (06:11 +0000)]
Improve unused variable check.

[r23057]

15 years agoImplement a statement walker.
Christoph Mallon [Tue, 21 Oct 2008 06:07:12 +0000 (06:07 +0000)]
Implement a statement walker.

[r23056]

15 years agoRemove a variable, which was found by the new, shiny -Wunused-variable.
Christoph Mallon [Mon, 20 Oct 2008 10:47:54 +0000 (10:47 +0000)]
Remove a variable, which was found by the new, shiny -Wunused-variable.

[r23027]

15 years agoAnother attempt to solve the halting problem: Detect variables, which are never read...
Christoph Mallon [Mon, 20 Oct 2008 10:46:10 +0000 (10:46 +0000)]
Another attempt to solve the halting problem: Detect variables, which are never read.  The test is cheap and could be improved by using dataflow, SSA and fixpoint magic, but of course it is lightyears ahead of GCC.  For example in x = x + 1; x is not marked as read, because it is only used to assign to itself.

[r23026]

15 years agoMake check_unreachable() more tail recursion friendly.
Christoph Mallon [Mon, 20 Oct 2008 08:40:04 +0000 (08:40 +0000)]
Make check_unreachable() more tail recursion friendly.

[r23021]

15 years agoResolve assertion, when using -fsyntax-only.
Christoph Mallon [Mon, 20 Oct 2008 08:35:58 +0000 (08:35 +0000)]
Resolve assertion, when using -fsyntax-only.

[r23020]

15 years agoRemove stale (since r21011) comment.
Christoph Mallon [Sun, 19 Oct 2008 17:30:24 +0000 (17:30 +0000)]
Remove stale (since r21011) comment.

[r23016]

15 years agoFix r23014.
Christoph Mallon [Sun, 19 Oct 2008 17:25:56 +0000 (17:25 +0000)]
Fix r23014.

[r23015]

15 years agoDo not generate an error message about incompatible types in ?: if the error type...
Christoph Mallon [Sun, 19 Oct 2008 16:49:14 +0000 (16:49 +0000)]
Do not generate an error message about incompatible types in ?: if the error type is involved.

[r23014]

15 years agoResolve some warnings.
Christoph Mallon [Sun, 19 Oct 2008 16:42:19 +0000 (16:42 +0000)]
Resolve some warnings.

[r23013]

15 years agoAdd forgotten conversion specifiers.
Christoph Mallon [Sun, 19 Oct 2008 16:27:40 +0000 (16:27 +0000)]
Add forgotten conversion specifiers.

[r23012]

15 years agoResolve some warnings.
Christoph Mallon [Sun, 19 Oct 2008 16:19:50 +0000 (16:19 +0000)]
Resolve some warnings.

[r23011]

15 years ago-fopt-foo means activate, not deactivate.
Christoph Mallon [Tue, 14 Oct 2008 15:16:52 +0000 (15:16 +0000)]
-fopt-foo means activate, not deactivate.

[r22879]

15 years agoAdd debug info to implicitly created != 0 tests in ifs.
Christoph Mallon [Mon, 13 Oct 2008 10:37:57 +0000 (10:37 +0000)]
Add debug info to implicitly created != 0 tests in ifs.

[r22835]

15 years agono need for bitfiddle here
Matthias Braun [Sat, 11 Oct 2008 18:53:41 +0000 (18:53 +0000)]
no need for bitfiddle here

[r22709]

15 years agoPrint AST and error/warning summary even in the presence of preprocessor errors.
Christoph Mallon [Tue, 7 Oct 2008 07:33:26 +0000 (07:33 +0000)]
Print AST and error/warning summary even in the presence of preprocessor errors.

[r22560]

15 years agoRemove unreachable statement.
Christoph Mallon [Tue, 7 Oct 2008 07:13:48 +0000 (07:13 +0000)]
Remove unreachable statement.

[r22559]

15 years agoShow the number of the conversion specification in the format check warnings.
Christoph Mallon [Tue, 7 Oct 2008 07:12:59 +0000 (07:12 +0000)]
Show the number of the conversion specification in the format check warnings.

[r22558]

15 years agoRemove pointless local variable.
Christoph Mallon [Tue, 7 Oct 2008 07:01:16 +0000 (07:01 +0000)]
Remove pointless local variable.

[r22557]

15 years agoRemove redundant assignment.
Christoph Mallon [Tue, 7 Oct 2008 06:39:22 +0000 (06:39 +0000)]
Remove redundant assignment.

[r22556]

15 years ago- improve error message even more ;-)
Michael Beck [Mon, 6 Oct 2008 22:40:10 +0000 (22:40 +0000)]
- improve error message even more ;-)

[r22555]

15 years ago- improve error message
Michael Beck [Mon, 6 Oct 2008 22:36:55 +0000 (22:36 +0000)]
- improve error message

[r22554]

15 years ago- allow '-' for s and S format
Michael Beck [Mon, 6 Oct 2008 21:50:23 +0000 (21:50 +0000)]
- allow '-' for s and S format
- improve error message

[r22553]

15 years agoonly query primitive types for their base type
Matthias Braun [Mon, 6 Oct 2008 18:54:52 +0000 (18:54 +0000)]
only query primitive types for their base type

[r22549]

15 years agofix missing skip_typeref buf
Matthias Braun [Mon, 6 Oct 2008 13:27:51 +0000 (13:27 +0000)]
fix missing skip_typeref buf

[r22533]

15 years agodisable fix for parsetest/fehler053.c for now (as it breaks more common use cases)
Matthias Braun [Mon, 6 Oct 2008 13:20:23 +0000 (13:20 +0000)]
disable fix for parsetest/fehler053.c for now (as it breaks more common use cases)

[r22530]

15 years agofix bitfield2.c
Matthias Braun [Fri, 3 Oct 2008 17:16:32 +0000 (17:16 +0000)]
fix bitfield2.c

[r22436]

15 years agotricky bitfield test from gcc (extended)
Matthias Braun [Fri, 3 Oct 2008 17:16:10 +0000 (17:16 +0000)]
tricky bitfield test from gcc (extended)

[r22435]

15 years agoImplement reference_addr() for DECLARATION_KIND_FUNCTION.
Christoph Mallon [Fri, 3 Oct 2008 16:36:40 +0000 (16:36 +0000)]
Implement reference_addr() for DECLARATION_KIND_FUNCTION.

[r22434]

15 years agoskip_typeref().
Christoph Mallon [Thu, 2 Oct 2008 21:51:20 +0000 (21:51 +0000)]
skip_typeref().

[r22424]

15 years agoFix assertion failure introduced in r22072.
Christoph Mallon [Thu, 2 Oct 2008 19:49:19 +0000 (19:49 +0000)]
Fix assertion failure introduced in r22072.

[r22422]

15 years agoskip_typeref().
Christoph Mallon [Thu, 2 Oct 2008 18:56:14 +0000 (18:56 +0000)]
skip_typeref().

[r22421]

15 years agoTreat expressions with error type as lvalues. There was a parse error before, which...
Christoph Mallon [Thu, 2 Oct 2008 18:39:58 +0000 (18:39 +0000)]
Treat expressions with error type as lvalues.  There was a parse error before, which maybe prevented properly recognizing it as lvalue.

[r22419]

15 years agoImprove error recovery for if-statements.
Christoph Mallon [Thu, 2 Oct 2008 18:29:30 +0000 (18:29 +0000)]
Improve error recovery for if-statements.

[r22418]

15 years agoParse __builtin_inf{,f,l} and correct __builtin_nand to __builtin_nanl.
Christoph Mallon [Thu, 2 Oct 2008 07:57:02 +0000 (07:57 +0000)]
Parse __builtin_inf{,f,l} and correct __builtin_nand to __builtin_nanl.

[r22406]

15 years ago- set the new combo flag
Michael Beck [Mon, 29 Sep 2008 23:39:17 +0000 (23:39 +0000)]
- set the new combo flag

[r22354]

15 years agouse firm array to avoid name/symbol clashes
Matthias Braun [Sun, 28 Sep 2008 18:31:20 +0000 (18:31 +0000)]
use firm array to avoid name/symbol clashes

[r22332]

15 years agoProcess declaration modifiers for variables in ast2firm, too.
Christoph Mallon [Fri, 26 Sep 2008 10:46:50 +0000 (10:46 +0000)]
Process declaration modifiers for variables in ast2firm, too.

[r22284]

15 years ago- add -finline-max-size= and -finline-threshold= parameter
Michael Beck [Fri, 26 Sep 2008 10:07:33 +0000 (10:07 +0000)]
- add -finline-max-size= and -finline-threshold= parameter

[r22279]

15 years agoincrease inline limit
Matthias Braun [Wed, 24 Sep 2008 14:50:51 +0000 (14:50 +0000)]
increase inline limit

[r22244]

15 years agoGenerate AST for some semantically invalid initializers.
Christoph Mallon [Tue, 23 Sep 2008 20:50:14 +0000 (20:50 +0000)]
Generate AST for some semantically invalid initializers.

[r22222]

15 years ago- add missing initialization of have_const_functions
Michael Beck [Tue, 23 Sep 2008 17:13:40 +0000 (17:13 +0000)]
- add missing initialization of have_const_functions

[r22214]

15 years agohandle DM_CONST, lower inline limit, force optimize_funccalls
Matthias Braun [Tue, 23 Sep 2008 14:57:08 +0000 (14:57 +0000)]
handle DM_CONST, lower inline limit, force optimize_funccalls

[r22210]

15 years agoTreat size_constant like a bool should be, i.e. do not explicitly compare with =...
Christoph Mallon [Tue, 23 Sep 2008 14:45:28 +0000 (14:45 +0000)]
Treat size_constant like a bool should be, i.e. do not explicitly compare with == 1/true.

[r22206]

15 years agodisable builtins by default
Matthias Braun [Tue, 23 Sep 2008 09:12:41 +0000 (09:12 +0000)]
disable builtins by default

[r22187]

15 years agopossibility to disable builtin functions
Matthias Braun [Mon, 22 Sep 2008 18:42:50 +0000 (18:42 +0000)]
possibility to disable builtin functions

[r22178]

15 years agomake -fsync default
Matthias Braun [Sun, 21 Sep 2008 22:48:19 +0000 (22:48 +0000)]
make -fsync default

[r22157]

15 years agoright_to_left() now returns 0 for left-to-right associativity instead of -1.
Christoph Mallon [Sat, 20 Sep 2008 12:17:52 +0000 (12:17 +0000)]
right_to_left() now returns 0 for left-to-right associativity instead of -1.

[r22138]

15 years agofix gcse
Matthias Braun [Fri, 19 Sep 2008 11:27:03 +0000 (11:27 +0000)]
fix gcse

[r22122]

15 years agoResolve off-by-one (and off-by-two) errors in the source position of statements.
Christoph Mallon [Fri, 19 Sep 2008 04:56:20 +0000 (04:56 +0000)]
Resolve off-by-one (and off-by-two) errors in the source position of statements.

[r22112]

15 years agoSet the source position in allocate_statement_zero().
Christoph Mallon [Fri, 19 Sep 2008 04:48:26 +0000 (04:48 +0000)]
Set the source position in allocate_statement_zero().

[r22111]

15 years agoMake stray ; outside of functions an error in strict mode.
Christoph Mallon [Thu, 18 Sep 2008 22:30:18 +0000 (22:30 +0000)]
Make stray ; outside of functions an error in strict mode.

[r22102]

15 years agoResolve compile error.
Christoph Mallon [Thu, 18 Sep 2008 22:29:34 +0000 (22:29 +0000)]
Resolve compile error.

[r22101]

15 years ago- BugFix: unitializer must be created using qualifiers from array-skipped typed
Michael Beck [Thu, 18 Sep 2008 19:17:54 +0000 (19:17 +0000)]
- BugFix: unitializer must be created using qualifiers from array-skipped typed

[r22092]

15 years ago- add get_type_qualifiers() allowing to get the type qualifiers WITHOUT
Michael Beck [Thu, 18 Sep 2008 19:17:11 +0000 (19:17 +0000)]
- add get_type_qualifiers() allowing to get the type qualifiers WITHOUT
  using skip_typeref() AND allowing to skip ARRAY types

[r22091]

15 years agoThe standard calls it "file scope", so rename global_scope to file_scope.
Christoph Mallon [Thu, 18 Sep 2008 13:03:31 +0000 (13:03 +0000)]
The standard calls it "file scope", so rename global_scope to file_scope.

[r22079]

15 years agoResolve unreachable statement warnings.
Christoph Mallon [Thu, 18 Sep 2008 11:52:46 +0000 (11:52 +0000)]
Resolve unreachable statement warnings.

[r22077]

15 years agoPut T_EOF into the anchor set.
Christoph Mallon [Thu, 18 Sep 2008 11:43:02 +0000 (11:43 +0000)]
Put T_EOF into the anchor set.

[r22075]

15 years agodepend on libfirm (if path is specified in config.mak)
Matthias Braun [Thu, 18 Sep 2008 11:15:36 +0000 (11:15 +0000)]
depend on libfirm (if path is specified in config.mak)

[r22074]