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
Matthias Braun [Wed, 15 Jun 2011 13:00:28 +0000 (15:00 +0200)]
query firm backend for machine_size and long double size
Matthias Braun [Wed, 15 Jun 2011 12:57:04 +0000 (14:57 +0200)]
remove strange warning
A warning which notifies me that I use a GNU extension is strange.
If I don't want to use them I can do -std=c99 and turn the situation
into an error. When I do use them I don't(!) want to see a warning.
Matthias Braun [Wed, 15 Jun 2011 12:56:20 +0000 (14:56 +0200)]
fix some cparser warnings
Christoph Mallon [Fri, 17 Jun 2011 07:15:17 +0000 (09:15 +0200)]
Make error correction more robust when the parser encounters a storage class where it only expected a typename.
Christoph Mallon [Fri, 17 Jun 2011 04:54:28 +0000 (06:54 +0200)]
Improve error message for invalid types in array access.
Christoph Mallon [Thu, 16 Jun 2011 16:43:46 +0000 (18:43 +0200)]
Correct wrong positions in error/warning messages.
Christoph Mallon [Fri, 17 Jun 2011 04:09:28 +0000 (06:09 +0200)]
s/threat/treat/.
Christoph Mallon [Fri, 17 Jun 2011 04:04:38 +0000 (06:04 +0200)]
Remove unnecessary goto.
Christoph Mallon [Fri, 17 Jun 2011 03:45:07 +0000 (05:45 +0200)]
Mark a label as used when it is actually used, not later on in the label checker.
Christoph Mallon [Thu, 16 Jun 2011 21:00:26 +0000 (23:00 +0200)]
Let get_label() handle consuming the label identifier instead of all its callers.
Christoph Mallon [Thu, 16 Jun 2011 20:15:01 +0000 (22:15 +0200)]
Clean up get_label().
Christoph Mallon [Thu, 16 Jun 2011 17:27:47 +0000 (19:27 +0200)]
Pass the symbol to allocate_entity_zero() instead of setting it later on.
Christoph Mallon [Thu, 16 Jun 2011 17:07:58 +0000 (19:07 +0200)]
Pass the namespace to allocate_entity_zero() instead of setting it later on.
Christoph Mallon [Thu, 16 Jun 2011 14:22:21 +0000 (16:22 +0200)]
Do not bail out on simple typo of put/get in parse_attribute_ms_property().
Christoph Mallon [Thu, 16 Jun 2011 14:46:16 +0000 (16:46 +0200)]
Remove unnecessary error message.
If this case is entered, there was an error message that the declarator is abstract before.
Christoph Mallon [Thu, 16 Jun 2011 14:08:44 +0000 (16:08 +0200)]
Simplify format string in error message.
Christoph Mallon [Thu, 16 Jun 2011 13:47:33 +0000 (15:47 +0200)]
Remove if (type != NULL), which due to prior program logic cannot be false.
Christoph Mallon [Thu, 16 Jun 2011 13:29:40 +0000 (15:29 +0200)]
Correct off-by-one error when checking whether the end of the GNU attribute list was reached.
Christoph Mallon [Thu, 16 Jun 2011 12:32:17 +0000 (14:32 +0200)]
Do not unnecessarily bail out early when encountering certain parse errors.
Christoph Mallon [Thu, 16 Jun 2011 09:31:29 +0000 (11:31 +0200)]
Correct off-by-one-token error in warning.
Christoph Mallon [Thu, 16 Jun 2011 05:22:20 +0000 (07:22 +0200)]
Handle the initial memset() of the declaration specifier struct in parse_declaration_specifiers().
Christoph Mallon [Wed, 15 Jun 2011 16:47:29 +0000 (18:47 +0200)]
Implement and document -Wshadow-local.
- This works like -Wshadow, but only warns if the shadowed declaration is not global.
- Activate it with -Wall.
- Demote -Wshadow to -Wextra.
Christoph Mallon [Wed, 15 Jun 2011 16:46:37 +0000 (18:46 +0200)]
Accept -W as alias for -Wextra.
Christoph Mallon [Wed, 15 Jun 2011 06:01:36 +0000 (08:01 +0200)]
Add EXPR_LITERAL_BOOLEAN to get_expression_struct_size().
Matthias Braun [Fri, 10 Jun 2011 13:28:41 +0000 (15:28 +0200)]
optimisation => optimization
Matthias Braun [Fri, 10 Jun 2011 13:29:09 +0000 (15:29 +0200)]
amend to --help
Matthias Braun [Fri, 10 Jun 2011 13:25:26 +0000 (15:25 +0200)]
reorganize firm_cmdline, implement --help-optimization
Matthias Braun [Fri, 10 Jun 2011 12:56:45 +0000 (14:56 +0200)]
we (and gcc) have no real -fstrength-reduce
Matthias Braun [Fri, 10 Jun 2011 12:51:48 +0000 (14:51 +0200)]
move -ffp-XXX flags handling to main cparser to be more independent of firm_cmdline
Matthias Braun [Thu, 9 Jun 2011 11:43:47 +0000 (13:43 +0200)]
added elf-visibility handling
Currently only used for jna export though.
Matthias Braun [Thu, 9 Jun 2011 11:17:39 +0000 (13:17 +0200)]
fix crash when mode attribut misses arguments
Matthias Braun [Thu, 9 Jun 2011 11:06:07 +0000 (13:06 +0200)]
move docu comments to header
Matthias Braun [Tue, 7 Jun 2011 11:07:04 +0000 (13:07 +0200)]
preprocessor has to be aware of bitwidth too
Matthias Braun [Tue, 7 Jun 2011 10:41:42 +0000 (12:41 +0200)]
long overflows at LONG_MAX not at INT_MAX
Christoph Mallon [Mon, 6 Jun 2011 13:33:55 +0000 (15:33 +0200)]
Use internal_errorf() instead of errorf() for internal errors -- quite logical, isn't it?
Christoph Mallon [Sat, 4 Jun 2011 12:44:22 +0000 (14:44 +0200)]
Use variables more consistently.
Christoph Mallon [Sat, 4 Jun 2011 12:43:29 +0000 (14:43 +0200)]
Reduce code duplication.
Christoph Mallon [Sat, 4 Jun 2011 12:33:24 +0000 (14:33 +0200)]
Correct off-by-something errors in diagnostic messages.
Christoph Mallon [Sat, 4 Jun 2011 12:27:05 +0000 (14:27 +0200)]
Feature: Show the column number in diagnostic messages.
- This can be toggled with -f[no-]show-column. Default is on.
- The column number can be off, because gcc's preprocessors collapses consecutive whitespace.
Christoph Mallon [Sat, 4 Jun 2011 12:35:35 +0000 (14:35 +0200)]
Rename the attribute linenr of struct source_position_t to lineno.
Christoph Mallon [Sat, 4 Jun 2011 11:56:55 +0000 (13:56 +0200)]
Reduce code duplication for printing diagnostics.
Christoph Mallon [Thu, 2 Jun 2011 07:20:10 +0000 (09:20 +0200)]
Report an error when the index of an array access is not of integer type.
Christoph Mallon [Thu, 2 Jun 2011 07:13:36 +0000 (09:13 +0200)]
Cleanup, reduce code duplication.
Christoph Mallon [Wed, 1 Jun 2011 08:46:06 +0000 (10:46 +0200)]
Add missing check for reference declarator.
Christoph Mallon [Wed, 1 Jun 2011 08:37:29 +0000 (10:37 +0200)]
Remove unnecessary gotos.
Christoph Mallon [Wed, 1 Jun 2011 08:36:14 +0000 (10:36 +0200)]
Make error message a bit more clear.
Christoph Mallon [Wed, 1 Jun 2011 08:34:59 +0000 (10:34 +0200)]
Cleanup.
Use (void) for empty parameter lists and reduce code duplication.
Christoph Mallon [Wed, 1 Jun 2011 08:34:15 +0000 (10:34 +0200)]
Use a null pointer for marking the current position as unreachable again.
Using a BadBB has no benefits.
Andreas Zwinkau [Tue, 31 May 2011 14:10:30 +0000 (16:10 +0200)]
Add Bad preds for unreachable code
Fixes C/segfault7
Andreas Zwinkau [Tue, 31 May 2011 14:02:01 +0000 (16:02 +0200)]
Construct Bads for unreachable code
Otherwise local opts might produce "strange" graphs, for example, loops without Phis.
Andreas Zwinkau [Tue, 31 May 2011 12:16:39 +0000 (14:16 +0200)]
Ignore -fvisibility= arguments
Christoph Mallon [Tue, 31 May 2011 11:41:18 +0000 (13:41 +0200)]
Report an error on empty character constants, i.e. ''.
Matthias Braun [Tue, 31 May 2011 10:47:11 +0000 (12:47 +0200)]
trigger flip-flopping normalisation
Matthias Braun [Mon, 30 May 2011 12:22:34 +0000 (14:22 +0200)]
added --help texts which document most options
Matthias Braun [Fri, 27 May 2011 09:08:20 +0000 (11:08 +0200)]
remove unsupported option omit-leaf-frame-pointer option
Matthias Braun [Fri, 27 May 2011 09:03:09 +0000 (11:03 +0200)]
option was parsed twice
Christoph Mallon [Mon, 30 May 2011 10:33:28 +0000 (12:33 +0200)]
Correct parsing of abstract function declarators.
Christoph Mallon [Sun, 29 May 2011 10:16:20 +0000 (12:16 +0200)]
Prevent dereferencing a null pointer, when parse_attribute_gnu() returns an empty list of attributes.
Matthias Braun [Sat, 7 May 2011 11:05:39 +0000 (13:05 +0200)]
fix a few builtin declarations, add stpcpy builtin
Matthias Braun [Sat, 7 May 2011 00:09:42 +0000 (02:09 +0200)]
fix const_void_ptr builtin types
Matthias Braun [Thu, 26 May 2011 11:28:26 +0000 (13:28 +0200)]
removing unused entities from the frame should happen as late as possible
Matthias Braun [Thu, 26 May 2011 11:09:30 +0000 (13:09 +0200)]
perform a convopt after target lowering, reorder some localopts