cparser
15 years agocosmetics
Matthias Braun [Thu, 29 Jan 2009 17:27:43 +0000 (17:27 +0000)]
cosmetics

[r25398]

15 years agoarray size must be integer
Matthias Braun [Thu, 29 Jan 2009 17:27:40 +0000 (17:27 +0000)]
array size must be integer

[r25397]

15 years agosome things aren't constant
Matthias Braun [Thu, 29 Jan 2009 17:27:22 +0000 (17:27 +0000)]
some things aren't constant

[r25396]

15 years agoavoid obstack_printf for very large strings (it's cheating with a fixed size buffer)
Matthias Braun [Thu, 29 Jan 2009 17:04:24 +0000 (17:04 +0000)]
avoid obstack_printf for very large strings (it's cheating with a fixed size buffer)

[r25395]

15 years agoDocument evaluation of typedef with VLA declarator by citing the standard.
Christoph Mallon [Wed, 28 Jan 2009 10:07:59 +0000 (10:07 +0000)]
Document evaluation of typedef with VLA declarator by citing the standard.

[r25386]

15 years agoC99 §6.2.3:1 24) There is only one name space for tags even though three are possible.
Christoph Mallon [Wed, 28 Jan 2009 00:07:31 +0000 (00:07 +0000)]
C99 §6.2.3:1 24)  There is only one name space for tags even though three are possible.

[r25385]

15 years agoIndendation.
Christoph Mallon [Tue, 27 Jan 2009 23:33:22 +0000 (23:33 +0000)]
Indendation.

[r25384]

15 years agofputs() + fputc() -> fputs().
Christoph Mallon [Tue, 27 Jan 2009 14:50:58 +0000 (14:50 +0000)]
fputs() + fputc() -> fputs().

[r25382]

15 years agofix of by 1 error, add a hack for pointer arrays
Matthias Braun [Tue, 20 Jan 2009 09:49:17 +0000 (09:49 +0000)]
fix of by 1 error, add a hack for pointer arrays

[r25288]

15 years agomissing skip_typeref
Matthias Braun [Tue, 20 Jan 2009 09:48:53 +0000 (09:48 +0000)]
missing skip_typeref

[r25287]

15 years agoadd missing directories to Makefile
Matthias Braun [Tue, 20 Jan 2009 09:48:41 +0000 (09:48 +0000)]
add missing directories to Makefile

[r25286]

15 years ago- fixed access to outer variables
Michael Beck [Mon, 19 Jan 2009 20:55:11 +0000 (20:55 +0000)]
- fixed access to outer variables

[r25270]

15 years ago- corerctly transform inner functions to firm
Michael Beck [Mon, 19 Jan 2009 16:19:52 +0000 (16:19 +0000)]
- corerctly transform inner functions to firm

[r25265]

15 years agoGet rid of pn_Start_value_param:
Michael Beck [Mon, 19 Jan 2009 01:06:42 +0000 (01:06 +0000)]
Get rid of pn_Start_value_param:
Access to value_type entities is now given by the frame pointer.

[r25250]

15 years ago- some doxygen info for the changed routines
Michael Beck [Sun, 18 Jan 2009 01:05:51 +0000 (01:05 +0000)]
- some doxygen info for the changed routines

[r25242]

15 years ago- add __based support
Michael Beck [Sun, 18 Jan 2009 01:00:33 +0000 (01:00 +0000)]
- add __based support

[r25241]

15 years agoRemove unused variable.
Christoph Mallon [Sat, 3 Jan 2009 06:55:57 +0000 (06:55 +0000)]
Remove unused variable.

[r25075]

15 years ago- add intrinsic lowerer for strcpy(), mempcpy(), memmove(), strncmp()
Michael Beck [Sat, 3 Jan 2009 04:48:59 +0000 (04:48 +0000)]
- add intrinsic lowerer for strcpy(), mempcpy(), memmove(), strncmp()
- add missing strlen() intrinsic lowerer

[r25073]

15 years ago- free-standing is a negative option
Michael Beck [Sat, 3 Jan 2009 04:13:52 +0000 (04:13 +0000)]
- free-standing is a negative option

[r25071]

15 years ago- implemented va_copy(), needed for C99
Michael Beck [Sat, 3 Jan 2009 03:56:38 +0000 (03:56 +0000)]
- implemented va_copy(), needed for C99
- add semantic to va_arg
- add walk_expression support for va_* expressions

[r25070]

15 years agomap strcasecmp() to _stricmp() for Windows.
Christoph Mallon [Fri, 2 Jan 2009 19:37:17 +0000 (19:37 +0000)]
map strcasecmp() to _stricmp() for Windows.

[r25066]

15 years ago- typo fixed
Michael Beck [Fri, 2 Jan 2009 17:45:38 +0000 (17:45 +0000)]
- typo fixed

[r25064]

15 years ago- add FE support for MS _AddressOfReturnAddress()
Michael Beck [Fri, 2 Jan 2009 17:33:13 +0000 (17:33 +0000)]
- add FE support for MS _AddressOfReturnAddress()

[r25062]

15 years ago- some comments
Michael Beck [Fri, 2 Jan 2009 17:32:24 +0000 (17:32 +0000)]
- some comments

[r25061]

15 years ago- va_start/va_arg uses now the stack parameter alignment
Michael Beck [Fri, 2 Jan 2009 17:31:06 +0000 (17:31 +0000)]
- va_start/va_arg uses now the stack parameter alignment

[r25060]

15 years ago- add stricmp() macro
Michael Beck [Fri, 2 Jan 2009 17:13:48 +0000 (17:13 +0000)]
- add stricmp() macro

[r25056]

15 years agoUse next_token() instead of eat() after eat_until_matching_token(), because we could...
Christoph Mallon [Fri, 2 Jan 2009 11:43:19 +0000 (11:43 +0000)]
Use next_token() instead of eat() after eat_until_matching_token(), because we could have reached EOF.

[r25039]

15 years agoWhen skipping arguments of unknown __attribute__s also skip the closing ")".
Christoph Mallon [Fri, 2 Jan 2009 11:40:41 +0000 (11:40 +0000)]
When skipping arguments of unknown __attribute__s also skip the closing ")".
Reported by: sanxiyn

[r25038]

15 years agoComplain about arrays with length <= 0.
Christoph Mallon [Fri, 2 Jan 2009 09:40:56 +0000 (09:40 +0000)]
Complain about arrays with length <= 0.

[r25035]

15 years agoRefer to the standard.
Christoph Mallon [Thu, 1 Jan 2009 20:47:58 +0000 (20:47 +0000)]
Refer to the standard.

[r25031]

15 years agoAvoid printing two more possible null pointers.
Christoph Mallon [Thu, 1 Jan 2009 20:43:53 +0000 (20:43 +0000)]
Avoid printing two more possible null pointers.

[r25030]

15 years agoTweak error message: Avoid printing null pointer string.
Christoph Mallon [Thu, 1 Jan 2009 20:12:42 +0000 (20:12 +0000)]
Tweak error message: Avoid printing null pointer string.

[r25029]

15 years agoMove (void) parameter detection into a separate function, simplify daisy chaining...
Christoph Mallon [Thu, 1 Jan 2009 20:09:45 +0000 (20:09 +0000)]
Move (void) parameter detection into a separate function, simplify daisy chaining parameters.

[r25028]

15 years agoSimplify daisy chaining function call arguments.
Christoph Mallon [Thu, 1 Jan 2009 17:52:48 +0000 (17:52 +0000)]
Simplify daisy chaining function call arguments.

[r25027]

15 years agoSimplify daisy chaining function parameters in parse_kr_declaration_list().
Christoph Mallon [Thu, 1 Jan 2009 17:16:23 +0000 (17:16 +0000)]
Simplify daisy chaining function parameters in parse_kr_declaration_list().

[r25026]

15 years agoFactorise code to allocate parameters.
Christoph Mallon [Thu, 1 Jan 2009 16:45:20 +0000 (16:45 +0000)]
Factorise code to allocate parameters.

[r25025]

15 years agoMake parsing of __based() less intrusive.
Christoph Mallon [Thu, 1 Jan 2009 16:05:50 +0000 (16:05 +0000)]
Make parsing of __based() less intrusive.

[r25023]

15 years agoSimplify daisy chaining of construct types in parse_inner_declarator().
Christoph Mallon [Thu, 1 Jan 2009 14:16:40 +0000 (14:16 +0000)]
Simplify daisy chaining of construct types in parse_inner_declarator().

[r25022]

15 years agoIntroduce union construct_type_t to avoid dubious casts.
Christoph Mallon [Thu, 1 Jan 2009 13:27:02 +0000 (13:27 +0000)]
Introduce union construct_type_t to avoid dubious casts.

[r25020]

15 years agoSlightly simplify type hashing in construct_declarator_type().
Christoph Mallon [Thu, 1 Jan 2009 11:34:56 +0000 (11:34 +0000)]
Slightly simplify type hashing in construct_declarator_type().

[r25015]

15 years agoFix linkage check for local variables in check_variable_type_complete().
Christoph Mallon [Thu, 1 Jan 2009 10:31:55 +0000 (10:31 +0000)]
Fix linkage check for local variables in check_variable_type_complete().

[r25014]

15 years agoRemove the write-only attribute bool has_flexible_member from struct compound_t.
Christoph Mallon [Thu, 1 Jan 2009 10:16:04 +0000 (10:16 +0000)]
Remove the write-only attribute bool has_flexible_member from struct compound_t.

[r25013]

15 years agoSimplify macro mumbo jumbo.
Christoph Mallon [Thu, 1 Jan 2009 09:34:19 +0000 (09:34 +0000)]
Simplify macro mumbo jumbo.

[r25012]

15 years agoFix logic error in is_builtin_expect() introduced in r24902.
Christoph Mallon [Wed, 31 Dec 2008 20:43:53 +0000 (20:43 +0000)]
Fix logic error in is_builtin_expect() introduced in r24902.

[r25011]

15 years agoRemove resolved TODO item (-Wparentheses).
Christoph Mallon [Tue, 30 Dec 2008 17:33:18 +0000 (17:33 +0000)]
Remove resolved TODO item (-Wparentheses).

[r24989]

15 years agoDo not query the precedence in the AST printer, if it is known already.
Christoph Mallon [Tue, 30 Dec 2008 17:32:17 +0000 (17:32 +0000)]
Do not query the precedence in the AST printer, if it is known already.

[r24988]

15 years ago- more MS intrinsics
Michael Beck [Mon, 29 Dec 2008 02:17:42 +0000 (02:17 +0000)]
- more MS intrinsics

[r24939]

15 years ago- more builtins
Michael Beck [Sat, 27 Dec 2008 03:44:55 +0000 (03:44 +0000)]
- more builtins

[r24905]

15 years ago- c_mode must be set before init_types()
Michael Beck [Sat, 27 Dec 2008 03:43:48 +0000 (03:43 +0000)]
- c_mode must be set before init_types()

[r24904]

15 years ago- fixed warnings
Michael Beck [Sat, 27 Dec 2008 00:38:45 +0000 (00:38 +0000)]
- fixed warnings

[r24903]

15 years agoRemoved EXPR_BUILTIN_SYMBOL: Builtins are now predefined functions
Michael Beck [Sat, 27 Dec 2008 00:26:19 +0000 (00:26 +0000)]
Removed EXPR_BUILTIN_SYMBOL: Builtins are now predefined functions
with a builtin_kind != bk_none.
This simplifies parsing and allows to have "different" builtin-sets (enable MS builtins for instance)

[r24902]

15 years agoAdd windows-1252 (alias cp1252) as input encoding.
Christoph Mallon [Fri, 26 Dec 2008 08:53:10 +0000 (08:53 +0000)]
Add windows-1252 (alias cp1252) as input encoding.

[r24898]

15 years agoFix printing of pointers and references to arrays.
Christoph Mallon [Thu, 25 Dec 2008 09:22:08 +0000 (09:22 +0000)]
Fix printing of pointers and references to arrays.

[r24893]

15 years ago- fixed implementation of various __builtin functions
Michael Beck [Wed, 24 Dec 2008 03:47:58 +0000 (03:47 +0000)]
- fixed implementation of various __builtin functions

[r24886]

15 years ago- implemented __builtin_trap()
Michael Beck [Wed, 24 Dec 2008 02:38:38 +0000 (02:38 +0000)]
- implemented __builtin_trap()

[r24883]

15 years ago- implemented __builtin_(ffs|ctz|clz|popcount|parity)
Michael Beck [Tue, 23 Dec 2008 17:35:01 +0000 (17:35 +0000)]
- implemented __builtin_(ffs|ctz|clz|popcount|parity)

[r24871]

15 years agoCorrectly handle qualified floats in get_default_promoted_type().
Christoph Mallon [Tue, 23 Dec 2008 12:00:17 +0000 (12:00 +0000)]
Correctly handle qualified floats in get_default_promoted_type().

[r24857]

15 years ago?: with omitted true-expression needs special handling if the condition ends in a...
Christoph Mallon [Sun, 21 Dec 2008 18:25:56 +0000 (18:25 +0000)]
?: with omitted true-expression needs special handling if the condition ends in a comparison, too.

[r24843]

15 years agoImplement -Wshadow.
Christoph Mallon [Sun, 21 Dec 2008 18:02:44 +0000 (18:02 +0000)]
Implement -Wshadow.

[r24841]

15 years agoHandle pointer arithmetic with variable sized types in ast2firm.
Christoph Mallon [Sun, 21 Dec 2008 17:57:03 +0000 (17:57 +0000)]
Handle pointer arithmetic with variable sized types in ast2firm.

[r24840]

15 years agoUnify the form of references to the standard.
Christoph Mallon [Sun, 21 Dec 2008 17:04:37 +0000 (17:04 +0000)]
Unify the form of references to the standard.

[r24839]

15 years agoBetter show something (syntactically invalid) when printing a for-statement with...
Christoph Mallon [Sun, 21 Dec 2008 16:54:16 +0000 (16:54 +0000)]
Better show something (syntactically invalid) when printing a for-statement with multiple declarations instead of panic()ing.

[r24838]

15 years ago- implemented __builtin_prefetch()
Michael Beck [Sun, 21 Dec 2008 14:54:46 +0000 (14:54 +0000)]
- implemented __builtin_prefetch()
- __builtin_prefetch is now a builtin_symbol

[r24836]

15 years ago- some commnets
Michael Beck [Sun, 21 Dec 2008 14:17:16 +0000 (14:17 +0000)]
- some commnets

[r24834]

15 years agoRemove two redundant get_dbg_info() which were found while implementing -Wshadow.
Christoph Mallon [Sun, 21 Dec 2008 13:08:21 +0000 (13:08 +0000)]
Remove two redundant get_dbg_info() which were found while implementing -Wshadow.

[r24827]

15 years agoAvoid double parentheses when AST printing sizeof expressions.
Christoph Mallon [Sun, 21 Dec 2008 13:06:37 +0000 (13:06 +0000)]
Avoid double parentheses when AST printing sizeof expressions.

[r24826]

15 years ago- implement builtin_(frame|return)_address() firm representation using Builtin nodes
Michael Beck [Thu, 18 Dec 2008 18:34:49 +0000 (18:34 +0000)]
- implement builtin_(frame|return)_address() firm representation using Builtin nodes

[r24795]

15 years agoUse revert_automatic_type_conversion() to determine the type of typeof().
Christoph Mallon [Thu, 18 Dec 2008 13:05:10 +0000 (13:05 +0000)]
Use revert_automatic_type_conversion() to determine the type of typeof().

[r24780]

15 years agotypeof() always has a type set, so there is no need to access the expression.
Christoph Mallon [Thu, 18 Dec 2008 13:04:41 +0000 (13:04 +0000)]
typeof() always has a type set, so there is no need to access the expression.

[r24779]

15 years agoImplement __builtin_types_compatible_p().
Christoph Mallon [Thu, 18 Dec 2008 12:04:54 +0000 (12:04 +0000)]
Implement __builtin_types_compatible_p().

[r24777]

15 years agoIndentation.
Christoph Mallon [Thu, 18 Dec 2008 11:09:08 +0000 (11:09 +0000)]
Indentation.

[r24775]

15 years agoSkip non-parameter entities in parameter lists. This happens when a struct/union...
Christoph Mallon [Thu, 18 Dec 2008 11:08:32 +0000 (11:08 +0000)]
Skip non-parameter entities in parameter lists. This happens when a struct/union tag is declared in a parameter list.

[r24774]

15 years ago- reimplemented __builtin_frame_address() and __builtin_return_address() as a builtin...
Michael Beck [Thu, 18 Dec 2008 10:53:43 +0000 (10:53 +0000)]
- reimplemented __builtin_frame_address() and __builtin_return_address() as a builtin_symbol
- generate code for __builtin_frame_address(0)

[r24773]

15 years agoMerge common cases in print_entity().
Christoph Mallon [Thu, 18 Dec 2008 10:51:05 +0000 (10:51 +0000)]
Merge common cases in print_entity().

[r24772]

15 years agoTwo places did not respect, that the true expression of ?: may be missing.
Christoph Mallon [Thu, 18 Dec 2008 08:08:17 +0000 (08:08 +0000)]
Two places did not respect, that the true expression of ?: may be missing.

[r24768]

15 years agoAdd some more bits for EXPR_BUILTIN_ADDRESS.
Christoph Mallon [Thu, 18 Dec 2008 07:50:38 +0000 (07:50 +0000)]
Add some more bits for EXPR_BUILTIN_ADDRESS.

[r24767]

15 years ago- implemented __builtin_(return|frame)_address() FE support
Michael Beck [Wed, 17 Dec 2008 23:46:51 +0000 (23:46 +0000)]
- implemented __builtin_(return|frame)_address() FE support
- fixed some warnings

[r24764]

15 years ago- Win32 has no strings.h
Michael Beck [Wed, 17 Dec 2008 23:18:57 +0000 (23:18 +0000)]
- Win32 has no strings.h

[r24763]

15 years agoSlightly simplify traversing declaration lists.
Christoph Mallon [Wed, 17 Dec 2008 13:46:03 +0000 (13:46 +0000)]
Slightly simplify traversing declaration lists.

[r24750]

15 years agoDo not set a non-null last declaration for a declaration statement, if the declaratio...
Christoph Mallon [Wed, 17 Dec 2008 13:33:15 +0000 (13:33 +0000)]
Do not set a non-null last declaration for a declaration statement, if the declaration statement ist empty.

[r24749]

15 years agoImprove the AST a little: Overwrite the type of a function at the definition in case...
Christoph Mallon [Wed, 17 Dec 2008 10:44:48 +0000 (10:44 +0000)]
Improve the AST a little: Overwrite the type of a function at the definition in case the previous declaration used a typedef.

[r24747]

15 years agoDo not emit an error about different entity kinds for the same symbol, if error entit...
Christoph Mallon [Wed, 17 Dec 2008 10:30:18 +0000 (10:30 +0000)]
Do not emit an error about different entity kinds for the same symbol, if error entities are involved.

[r24746]

15 years agoDo not change the local prev_type in record_entity(). The warning about missing...
Christoph Mallon [Wed, 17 Dec 2008 09:09:34 +0000 (09:09 +0000)]
Do not change the local prev_type in record_entity().  The warning about missing prior prototypes is missing otherwise.

[r24744]

15 years agoPut { of function on separate line.
Christoph Mallon [Wed, 17 Dec 2008 08:26:26 +0000 (08:26 +0000)]
Put { of function on separate line.

[r24740]

15 years agoLength 1 for global int x[]; is actually required by the standard!
Christoph Mallon [Wed, 17 Dec 2008 07:53:51 +0000 (07:53 +0000)]
Length 1 for global int x[]; is actually required by the standard!

[r24739]

15 years agoAdd the macro lengthof().
Christoph Mallon [Wed, 17 Dec 2008 07:52:22 +0000 (07:52 +0000)]
Add the macro lengthof().

[r24738]

15 years agoSLL(3) is too much, SLL(2) is sufficient.
Christoph Mallon [Tue, 16 Dec 2008 23:26:26 +0000 (23:26 +0000)]
SLL(3) is too much, SLL(2) is sufficient.

[r24736]

15 years agoSmall cleanup.
Christoph Mallon [Tue, 16 Dec 2008 23:20:36 +0000 (23:20 +0000)]
Small cleanup.

[r24735]

15 years agoFix stupid error in r24659.
Christoph Mallon [Tue, 16 Dec 2008 21:30:07 +0000 (21:30 +0000)]
Fix stupid error in r24659.

[r24733]

15 years agoAdd a skip_typeref(). In case of error a typedef could end up there.
Christoph Mallon [Tue, 16 Dec 2008 19:04:14 +0000 (19:04 +0000)]
Add a skip_typeref().  In case of error a typedef could end up there.

[r24730]

15 years agoRestore error check lost in r23661: The type of a function definition must not be...
Christoph Mallon [Tue, 16 Dec 2008 19:00:20 +0000 (19:00 +0000)]
Restore error check lost in r23661: The type of a function definition must not be a typedef.

[r24729]

15 years agoSort.
Christoph Mallon [Tue, 16 Dec 2008 18:57:09 +0000 (18:57 +0000)]
Sort.

[r24728]

15 years agoDo not consider alignment in the type hash. It is just wrong.
Christoph Mallon [Tue, 16 Dec 2008 14:41:19 +0000 (14:41 +0000)]
Do not consider alignment in the type hash.  It is just wrong.

[r24718]

15 years agoFix calculation of the value of multi-character character constants in signed char...
Christoph Mallon [Tue, 16 Dec 2008 11:19:57 +0000 (11:19 +0000)]
Fix calculation of the value of multi-character character constants in signed char mode.

[r24710]

15 years agoAdd (harmless) missing else.
Christoph Mallon [Tue, 16 Dec 2008 11:18:33 +0000 (11:18 +0000)]
Add (harmless) missing else.

[r24709]

15 years agoTypo.
Christoph Mallon [Tue, 16 Dec 2008 10:08:02 +0000 (10:08 +0000)]
Typo.

[r24708]

15 years agoUse .Sq instead of ''.
Christoph Mallon [Mon, 15 Dec 2008 23:56:27 +0000 (23:56 +0000)]
Use .Sq instead of ''.

[r24701]

15 years agoRename --{,un}sigend-chars to -f{,un}signed-char and document them in the manpage.
Christoph Mallon [Mon, 15 Dec 2008 23:43:04 +0000 (23:43 +0000)]
Rename --{,un}sigend-chars to -f{,un}signed-char and document them in the manpage.

[r24700]

15 years agoBetter check for is_Cond() instead of !is_Bad(): The Cond could have become a Tuple...
Christoph Mallon [Mon, 15 Dec 2008 22:59:51 +0000 (22:59 +0000)]
Better check for is_Cond() instead of !is_Bad(): The Cond could have become a Tuple, too.

[r24699]

15 years agoBefore setting branch prediction info for a Cond, make sure it is not Bad.
Christoph Mallon [Mon, 15 Dec 2008 22:56:22 +0000 (22:56 +0000)]
Before setting branch prediction info for a Cond, make sure it is not Bad.

[r24698]