Andreas Zwinkau [Thu, 10 Mar 2011 17:40:59 +0000 (18:40 +0100)]
Use submodule for libfirm binding
cparser usually depends on a specific libfirm revision,
so it makes sense to target a specific one via submodules.
Andreas Zwinkau [Mon, 6 Jun 2011 13:28:13 +0000 (15:28 +0200)]
Generate revision from git describe
Matthias Braun [Mon, 22 Aug 2011 14:17:25 +0000 (16:17 +0200)]
adapt to firm va_start changes
Christoph Mallon [Fri, 19 Aug 2011 06:48:55 +0000 (08:48 +0200)]
Simplify sizeof(x) / sizeof(x[0]) to lengthof(x).
Christoph Mallon [Fri, 19 Aug 2011 06:58:00 +0000 (08:58 +0200)]
Simplify iterating over opts[].
Christoph Mallon [Fri, 19 Aug 2011 06:55:15 +0000 (08:55 +0200)]
Merge timers[] into opts[].
Christoph Mallon [Thu, 18 Aug 2011 17:50:31 +0000 (19:50 +0200)]
Correct size, alignment and rank of long long and unsigned long long.
Christoph Mallon [Wed, 17 Aug 2011 17:20:54 +0000 (19:20 +0200)]
Prevent duplicate entity for variadic paramters.
Christoph Mallon [Wed, 17 Aug 2011 17:20:31 +0000 (19:20 +0200)]
Select n+1st parameter for va_start.
Matthias Braun [Wed, 17 Aug 2011 11:45:52 +0000 (13:45 +0200)]
simplify builtin infrastructure
Matthias Braun [Tue, 16 Aug 2011 11:17:40 +0000 (13:17 +0200)]
rework atomic and related types
rank is now put in atomic_type_properties, enum, imaginar, complex have
been merged to use atomic_type_t as a base, allowing lots of code to
treat them the same.
Christoph Mallon [Tue, 16 Aug 2011 16:49:44 +0000 (18:49 +0200)]
Add missing operand promotion of unary integer expressions.
Sebastian Buchwald [Tue, 16 Aug 2011 14:35:00 +0000 (16:35 +0200)]
Adapt cpu_arch after processing a target tripel.
Andreas Zwinkau [Tue, 16 Aug 2011 13:30:06 +0000 (15:30 +0200)]
Adapt to libFirm API
Christoph Mallon [Mon, 15 Aug 2011 17:21:10 +0000 (19:21 +0200)]
Correct integer conversion rank of _Bool.
It should be the lowest of all integer types, not the heighest.
This corrects C/bool3.c.
Matthias Braun [Sat, 13 Aug 2011 13:28:17 +0000 (15:28 +0200)]
fix write_only{12,13}.c testcases
Matthias Braun [Sat, 13 Aug 2011 12:00:20 +0000 (14:00 +0200)]
remove more unnecessary XXX_INVALID constants
Matthias Braun [Sat, 13 Aug 2011 11:55:29 +0000 (13:55 +0200)]
remove ENTITY_INVALID
Matthias Braun [Sat, 13 Aug 2011 11:52:58 +0000 (13:52 +0200)]
rename STATEMENT_INVALID to STATEMENT_ERROR
Matthias Braun [Sat, 13 Aug 2011 11:47:18 +0000 (13:47 +0200)]
remove EXPR_INVALID, EXPR_ERROR is enough
Matthias Braun [Sat, 13 Aug 2011 11:41:24 +0000 (13:41 +0200)]
remove TYPE_INVALID, TYPE_ERROR is enough
Matthias Braun [Fri, 12 Aug 2011 18:54:07 +0000 (20:54 +0200)]
do not crash when printing implicit union/struct selects
Matthias Braun [Fri, 12 Aug 2011 12:55:38 +0000 (14:55 +0200)]
perform an additional CopyB lowering step as lower_calls can introduce new ones
Matthias Braun [Fri, 12 Aug 2011 10:36:03 +0000 (12:36 +0200)]
differentiate between EXPR_INVALID and EXPR_ERROR
EXPR_INVALID should never happen can be considered a compiler bug
EXPR_ERROR represents parsing errors in a subexpression. This commit
should fix a few panics because of parsing errors.
Matthias Braun [Fri, 12 Aug 2011 09:20:16 +0000 (11:20 +0200)]
give stray-semicolon warning a name
Sebastian Buchwald [Tue, 12 Jul 2011 13:17:24 +0000 (15:17 +0200)]
We now support -msoft-float.
Matthias Braun [Fri, 12 Aug 2011 08:56:27 +0000 (10:56 +0200)]
implement some missing builtin variants
Matthias Braun [Fri, 12 Aug 2011 08:19:37 +0000 (10:19 +0200)]
implement -Wempty-body and -Wignored-qualifiers and ignore some more gcc warnings
Matthias Braun [Fri, 12 Aug 2011 07:22:34 +0000 (09:22 +0200)]
fix walking code trying to dereference some NULL pointers
Matthias Braun [Thu, 11 Aug 2011 23:28:40 +0000 (01:28 +0200)]
rework input logic to allow parsing from strings
Matthias Braun [Thu, 11 Aug 2011 21:02:49 +0000 (23:02 +0200)]
improve ast-walk infrastructure
Matthias Braun [Thu, 11 Aug 2011 19:59:57 +0000 (21:59 +0200)]
remove old EXPR_UNKNOWN artifact
Matthias Braun [Thu, 11 Aug 2011 19:34:21 +0000 (21:34 +0200)]
fix bug: not all unixes are ia32
Andreas Zwinkau [Thu, 11 Aug 2011 09:18:45 +0000 (11:18 +0200)]
Fix C/folderror
Instead of converting a tarval to long and check if it is negative,
we must check the tarval itself, because the constant might be too
big for long.
Matthias Braun [Wed, 10 Aug 2011 10:43:48 +0000 (12:43 +0200)]
rework architecture specific type handling
move lots of architecture exceptions to main.c; adapt to latest libfirm
Matthias Braun [Tue, 9 Aug 2011 13:14:51 +0000 (15:14 +0200)]
bitfields are an entity attribute now, not a type
Matthias Braun [Tue, 9 Aug 2011 09:11:14 +0000 (11:11 +0200)]
preprocessor: escape sequence, octal parsing in utf32
Matthias Braun [Tue, 26 Jul 2011 12:58:14 +0000 (14:58 +0200)]
move grow_symbol function into unicode.h
Matthias Braun [Tue, 26 Jul 2011 12:50:42 +0000 (14:50 +0200)]
transform token_t into a union (similar to ast-nodes)
Matthias Braun [Mon, 25 Jul 2011 13:16:10 +0000 (15:16 +0200)]
start working on include searchpath management
Matthias Braun [Mon, 25 Jul 2011 13:14:50 +0000 (15:14 +0200)]
fix pp_definition not being initialized in a symbol
Matthias Braun [Tue, 19 Jul 2011 10:30:23 +0000 (12:30 +0200)]
redo preprocessor output concerning spaces,newlines
Matthias Braun [Tue, 19 Jul 2011 10:29:27 +0000 (12:29 +0200)]
do not add searchpath stuff into parse_headername
Matthias Braun [Mon, 18 Jul 2011 17:51:54 +0000 (19:51 +0200)]
fix preprocessing token registration
Matthias Braun [Mon, 18 Jul 2011 17:32:12 +0000 (19:32 +0200)]
update preprocessor tests
Matthias Braun [Mon, 18 Jul 2011 17:13:03 +0000 (19:13 +0200)]
adapt preprocessor to coding standards
Matthias Braun [Mon, 18 Jul 2011 17:10:38 +0000 (19:10 +0200)]
preprocessor: cleanup, use new input functions
Matthias Braun [Mon, 18 Jul 2011 13:56:14 +0000 (15:56 +0200)]
factor out input-reading code from lexer.c into input.c
Matthias Braun [Mon, 18 Jul 2011 12:55:18 +0000 (14:55 +0200)]
remove support for compiler-builtin c-code (it was broken anyway and never produced faster code)
Matthias Braun [Wed, 23 Mar 2011 18:06:14 +0000 (19:06 +0100)]
adapt to firm taking of parameter address changes
Christoph Mallon [Sat, 30 Jul 2011 08:27:58 +0000 (10:27 +0200)]
GCC compatibility: Parse attributes after labels in C mode.
- This is necessary to compile 403.gcc.
- TODO: Process the attributes and not just ignore them.
Christoph Mallon [Fri, 29 Jul 2011 08:59:10 +0000 (10:59 +0200)]
Increase size of anchor token counters.
This is necessary if there is deep nesting like in 403.gcc.
Christoph Mallon [Fri, 29 Jul 2011 08:59:01 +0000 (10:59 +0200)]
Remove unused macro.
Matthias Braun [Thu, 28 Jul 2011 12:08:13 +0000 (14:08 +0200)]
use bool flag instead of UNARY_CAST_IMPLICIT
this also fixes constexpr6.c
Matthias Braun [Thu, 14 Jul 2011 08:27:07 +0000 (10:27 +0200)]
fix a few warnings reported by cparser
Matthias Braun [Thu, 14 Jul 2011 08:24:57 +0000 (10:24 +0200)]
-Winit-self is useless (and produces wrong warnings), remove it and make it a compatibility nop-switch
Christoph Mallon [Fri, 8 Jul 2011 11:53:45 +0000 (13:53 +0200)]
Support maximum field width in scanf() check.
Christoph Mallon [Fri, 8 Jul 2011 11:52:12 +0000 (13:52 +0200)]
Remove dead assignment.
Christoph Mallon [Fri, 8 Jul 2011 11:46:36 +0000 (13:46 +0200)]
Support '*' (suppress assignment) in scanf() check.
Christoph Mallon [Fri, 8 Jul 2011 11:43:29 +0000 (13:43 +0200)]
scanf({"%c","%lc"}) requieres a pointer to {char,wchar_t}, not {int,wint_t}.
Christoph Mallon [Fri, 8 Jul 2011 11:36:26 +0000 (13:36 +0200)]
Remove duplicate test.
Doing the test later on is sufficient.
The code inbetween does nothing when encountering '\0'.
Christoph Mallon [Fri, 8 Jul 2011 10:10:51 +0000 (12:10 +0200)]
Reduce code duplication.
Sebastian Buchwald [Fri, 8 Jul 2011 11:41:56 +0000 (13:41 +0200)]
Ooops, streq is the right function here.
Sebastian Buchwald [Fri, 8 Jul 2011 11:29:05 +0000 (13:29 +0200)]
Oops, fixed compile error.
Sebastian Buchwald [Fri, 8 Jul 2011 08:10:19 +0000 (10:10 +0200)]
Use an example from the list above.
Sebastian Buchwald [Fri, 8 Jul 2011 07:42:15 +0000 (09:42 +0200)]
Do not parse meaningless fno-... options.
This affects:
- showing the help text
- enabling floating points models
Sebastian Buchwald [Fri, 8 Jul 2011 07:41:14 +0000 (09:41 +0200)]
Added missing help entry.
Sebastian Buchwald [Fri, 8 Jul 2011 07:08:28 +0000 (09:08 +0200)]
Consistently use upper case in help text.
Sebastian Buchwald [Fri, 8 Jul 2011 07:06:35 +0000 (09:06 +0200)]
Replaced n't by not.
Sebastian Buchwald [Thu, 7 Jul 2011 11:16:52 +0000 (13:16 +0200)]
Improved help message.
Sebastian Buchwald [Thu, 7 Jul 2011 11:16:00 +0000 (13:16 +0200)]
One help entry for -ffp-precise is sufficient.
Sebastian Buchwald [Thu, 7 Jul 2011 10:43:43 +0000 (12:43 +0200)]
Fixed error message.
Christoph Mallon [Thu, 7 Jul 2011 12:13:16 +0000 (14:13 +0200)]
Properly handle %{h,hh}{d,u} in the printf format checker.
Christoph Mallon [Thu, 7 Jul 2011 12:12:18 +0000 (14:12 +0200)]
Warn that the '0' flag is ignored, if the precision is present in a format specification.
Christoph Mallon [Tue, 5 Jul 2011 09:36:28 +0000 (11:36 +0200)]
Parse __extension__ like GCC: It must not appear in declaration specifiers.
Christoph Mallon [Tue, 5 Jul 2011 09:37:47 +0000 (11:37 +0200)]
Parse __extension__ like GCC: It must not appear at the start of parameter declarations.
Christoph Mallon [Tue, 5 Jul 2011 09:35:37 +0000 (11:35 +0200)]
Parse __extension__ like GCC: It must not appear in typeof().
Christoph Mallon [Tue, 5 Jul 2011 09:52:14 +0000 (11:52 +0200)]
Parse __extension__ like GCC: Compound entry declarations may start with it.
Christoph Mallon [Tue, 5 Jul 2011 09:51:24 +0000 (11:51 +0200)]
Parse __extension__ like GCC: External declarations may start with it.
Christoph Mallon [Tue, 5 Jul 2011 09:41:22 +0000 (11:41 +0200)]
Add PUSH_EXTENSION()/POP_EXTENSION() to reduce code duplication.
Christoph Mallon [Thu, 30 Jun 2011 04:39:16 +0000 (06:39 +0200)]
C99: Declarations are not allowed as inner statements (they are no statements in C99).
Christoph Mallon [Wed, 29 Jun 2011 07:28:51 +0000 (09:28 +0200)]
Wrap switching scopes in the macros PUSH_SCOPE() and POP_SCOPE().
Christoph Mallon [Wed, 29 Jun 2011 07:20:22 +0000 (09:20 +0200)]
Assert in POP_PARENT() that the statement pushed in the corresponding PUSH_PARENT() is still on top.
Christoph Mallon [Wed, 29 Jun 2011 07:18:27 +0000 (09:18 +0200)]
Consistently use PUSH_PARENT()/POP_PARENT().
This corrects having the wrong parent after parsing an inner function.
Christoph Mallon [Wed, 29 Jun 2011 06:46:00 +0000 (08:46 +0200)]
Turn POP_PARENT into a function-like macro for visual consistency.
Christoph Mallon [Mon, 27 Jun 2011 14:08:05 +0000 (16:08 +0200)]
Improve error handling: Do not jump to the error_label if expect() finally finds the expected token after dropping some others.
Christoph Mallon [Mon, 27 Jun 2011 13:04:58 +0000 (15:04 +0200)]
Record correct source position for compound literals.
Christoph Mallon [Mon, 27 Jun 2011 12:46:38 +0000 (14:46 +0200)]
Do not redundantly set the source position again after allocate_expression_zero() did it.
Christoph Mallon [Mon, 27 Jun 2011 09:18:13 +0000 (11:18 +0200)]
Simplify is_octal_digit().
Christoph Mallon [Mon, 27 Jun 2011 09:10:06 +0000 (11:10 +0200)]
Prevent endless loop parse_compound_type_entries().
Christoph Mallon [Mon, 27 Jun 2011 05:17:32 +0000 (07:17 +0200)]
Correct off-by-one-token error when allocating attributes.
Christoph Mallon [Mon, 27 Jun 2011 05:15:58 +0000 (07:15 +0200)]
Record the position of attributes.
The mechanism is there, some warning messages show the position, but recording it was missing in allocate_attribute_zero().
Christoph Mallon [Mon, 27 Jun 2011 04:57:37 +0000 (06:57 +0200)]
Correct token encoding: wide string literals L"" and -> shared the same enum value
- This resulted in wrong error messages when an unexpected -> was found in the input.
- Remove the magic 265 (used explicitly by ->) by reordering the tokens.
Christoph Mallon [Mon, 27 Jun 2011 04:52:34 +0000 (06:52 +0200)]
Add missing TYPE_REFERENCE to get_type_struct_size().
Christoph Mallon [Mon, 27 Jun 2011 04:50:56 +0000 (06:50 +0200)]
Correct off-by-one-token error in parse_return().
Christoph Mallon [Sat, 25 Jun 2011 08:47:03 +0000 (10:47 +0200)]
Remove ancient assignments to source_position in parse_subexpression().
These are obsolete (and wrong) since allocate_expression_zero() sets the source_position.
Andreas Zwinkau [Fri, 24 Jun 2011 14:00:58 +0000 (16:00 +0200)]
Merge branch 'makefilefix'
Andreas Zwinkau [Fri, 24 Jun 2011 14:00:08 +0000 (16:00 +0200)]
Remove firm_cmdline from Makefile
Christoph Mallon [Fri, 24 Jun 2011 06:15:52 +0000 (08:15 +0200)]
Simplify daisy-chaining parameters in make_function_type().
Christoph Mallon [Fri, 24 Jun 2011 05:55:33 +0000 (07:55 +0200)]
Make type_obst static and remove unnecessary pointer indirection.