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.
Christoph Mallon [Fri, 24 Jun 2011 05:53:58 +0000 (07:53 +0200)]
Remove duplicate allocate_parameter().
Christoph Mallon [Fri, 24 Jun 2011 05:46:51 +0000 (07:46 +0200)]
Use allocate_type_zero() to reduce code duplication.
Christoph Mallon [Thu, 23 Jun 2011 08:46:11 +0000 (10:46 +0200)]
Inline allocate_ast() into its only caller (allocate_ast_zero()).
Christoph Mallon [Wed, 22 Jun 2011 06:34:10 +0000 (08:34 +0200)]
Simplify some do-while-0 macros.
Christoph Mallon [Wed, 22 Jun 2011 05:44:19 +0000 (07:44 +0200)]
Implement -f[no-]diagnostics-show-option.
Christoph Mallon [Wed, 22 Jun 2011 05:29:15 +0000 (07:29 +0200)]
"For example" is "e.g." (exempli gratia), not "i.e." (id est), which means "that is".
Christoph Mallon [Tue, 21 Jun 2011 20:22:54 +0000 (22:22 +0200)]
Make warning switch parsing compatible to GCC: -W[no-][error=]warning.
Christoph Mallon [Tue, 21 Jun 2011 16:07:43 +0000 (18:07 +0200)]
Fix regression: A format argument went missing.
Christoph Mallon [Tue, 21 Jun 2011 13:43:56 +0000 (15:43 +0200)]
Improve diagnostic handling: Add [-Wfoo] and -Werror-foo.
- Print the name of the warning switch at the end of each warning message, e.g. [-Wfoo]
- Every warning can now be turned into an error with -Werror-foo.
Christoph Mallon [Tue, 21 Jun 2011 12:35:50 +0000 (14:35 +0200)]
Do not generate warnings for implicit declarations in record_entity().
Christoph Mallon [Tue, 21 Jun 2011 12:20:27 +0000 (14:20 +0200)]
Reduce code duplication.
The duplicate contained a bug, of course: The shown position was wrong.
Christoph Mallon [Tue, 21 Jun 2011 09:20:25 +0000 (11:20 +0200)]
Add %N and %#N for printing entities to diagnosticf().
Christoph Mallon [Tue, 21 Jun 2011 09:13:29 +0000 (11:13 +0200)]
Sort format specifiers in comment for diagnosticf() and add missing variants.
Christoph Mallon [Tue, 21 Jun 2011 09:03:02 +0000 (11:03 +0200)]
Reduce code duplication in semantic_comparison().
Christoph Mallon [Fri, 17 Jun 2011 11:12:33 +0000 (13:12 +0200)]
Remove unnecessary goto.
Matthias Braun [Tue, 21 Jun 2011 12:04:50 +0000 (14:04 +0200)]
rename is_address_constant to is_linker_constant, document functions
Matthias Braun [Tue, 21 Jun 2011 12:03:15 +0000 (14:03 +0200)]
fix is_address_constant EXPR_SELECT case
Matthias Braun [Mon, 20 Jun 2011 17:24:02 +0000 (19:24 +0200)]
add missing EXPR_SELECT case in is_address_constant
Matthias Braun [Fri, 17 Jun 2011 19:15:53 +0000 (21:15 +0200)]
fix cparser warnings
Matthias Braun [Wed, 15 Jun 2011 17:03:21 +0000 (19:03 +0200)]
fix a bunch of warnings (reported by cparser)
Matthias Braun [Wed, 15 Jun 2011 13:33:50 +0000 (15:33 +0200)]
add -Wmissing-declarations to -Wall