cparser
15 years ago- BugFix: GCC allows arithmetic on function pointers
Michael Beck [Sun, 31 Aug 2008 11:32:13 +0000 (11:32 +0000)]
- BugFix: GCC allows arithmetic on function pointers
- implemented -Wpointer-arith

[r21579]

15 years ago- implemented -Wswitch-enum
Michael Beck [Sun, 31 Aug 2008 10:57:37 +0000 (10:57 +0000)]
- implemented -Wswitch-enum
- revert wrong typo fix
- fixed reachability test by using first_case and last_case

[r21577]

15 years agotypo fixed
Michael Beck [Sun, 31 Aug 2008 10:55:23 +0000 (10:55 +0000)]
typo fixed

[r21576]

15 years agoadded is_type_enum()
Michael Beck [Sun, 31 Aug 2008 10:54:54 +0000 (10:54 +0000)]
added is_type_enum()

[r21575]

15 years ago- add testcase for switch on enum
Michael Beck [Sun, 31 Aug 2008 10:11:04 +0000 (10:11 +0000)]
- add testcase for switch on enum

[r21574]

15 years ago- fixed some "enumerated type mixed with another type" warnings on icc
Michael Beck [Sun, 31 Aug 2008 09:59:40 +0000 (09:59 +0000)]
- fixed some "enumerated type mixed with another type" warnings on icc

[r21573]

15 years agoMAGIC_DEFAULT_PN_NUMBER is gone away ...
Michael Beck [Fri, 29 Aug 2008 11:43:16 +0000 (11:43 +0000)]
MAGIC_DEFAULT_PN_NUMBER is gone away ...

[r21565]

15 years agouse the spare_size flags
Michael Beck [Thu, 28 Aug 2008 13:04:53 +0000 (13:04 +0000)]
use the spare_size flags

[r21549]

15 years agoAdd the GCC options -f(no-)dollars-in-identifiers.
Christoph Mallon [Thu, 28 Aug 2008 12:34:55 +0000 (12:34 +0000)]
Add the GCC options -f(no-)dollars-in-identifiers.

[r21545]

15 years ago- removed non-functional jmp-tbl switch
Michael Beck [Thu, 28 Aug 2008 12:35:21 +0000 (12:35 +0000)]
- removed non-functional jmp-tbl switch

[r21544]

15 years agoBe somewhat resilient to typos in declaration specifiers to avoid stray error message...
Christoph Mallon [Thu, 28 Aug 2008 12:29:14 +0000 (12:29 +0000)]
Be somewhat resilient to typos in declaration specifiers to avoid stray error messages later on.

[r21543]

15 years agoFixed handling of case labels:
Michael Beck [Thu, 28 Aug 2008 12:20:29 +0000 (12:20 +0000)]
Fixed handling of case labels:
- correctly check gnu extensions
- handle GNU empty ranges
- fold constants only once

[r21542]

15 years agoforgot to save file
Michael Beck [Thu, 28 Aug 2008 11:55:41 +0000 (11:55 +0000)]
forgot to save file

[r21537]

15 years ago'$' in symbols can be switched off (if someone implements a command-line option for it)
Michael Beck [Thu, 28 Aug 2008 11:49:24 +0000 (11:49 +0000)]
'$' in symbols can be switched off (if someone implements a command-line option for it)

[r21536]

15 years agoOnly warn about reaching the end of a non-void function, if the return type is valid.
Christoph Mallon [Thu, 28 Aug 2008 11:28:16 +0000 (11:28 +0000)]
Only warn about reaching the end of a non-void function, if the return type is valid.

[r21535]

15 years agoReduce indentation.
Christoph Mallon [Thu, 28 Aug 2008 11:23:30 +0000 (11:23 +0000)]
Reduce indentation.

[r21534]

15 years agonewtype is a bool.
Christoph Mallon [Thu, 28 Aug 2008 11:22:34 +0000 (11:22 +0000)]
newtype is a bool.

[r21533]

15 years agoFix typo in error message.
Christoph Mallon [Thu, 28 Aug 2008 11:20:39 +0000 (11:20 +0000)]
Fix typo in error message.

[r21532]

15 years agoAttach a sensible source position to conditional (?:) expressions.
Christoph Mallon [Wed, 27 Aug 2008 18:15:53 +0000 (18:15 +0000)]
Attach a sensible source position to conditional (?:) expressions.

[r21526]

15 years agoUse the source position of the specifier for a declarator, until it gets a name....
Christoph Mallon [Wed, 27 Aug 2008 18:10:07 +0000 (18:10 +0000)]
Use the source position of the specifier for a declarator, until it gets a name.  This gives a meaningful source positions to nameless parameters.

[r21525]

15 years agoAccept $ in identifers.
Christoph Mallon [Wed, 27 Aug 2008 17:47:48 +0000 (17:47 +0000)]
Accept $ in identifers.

[r21524]

15 years agoFix parse error when parsing functions returning function pointers: The parameter...
Christoph Mallon [Wed, 27 Aug 2008 17:38:25 +0000 (17:38 +0000)]
Fix parse error when parsing functions returning function pointers:  The parameter list of the function pointer incorrectly got associated with the function declaration overriding the parameter list of the function.

[r21523]

15 years agoTypo in string.
Christoph Mallon [Wed, 27 Aug 2008 17:35:04 +0000 (17:35 +0000)]
Typo in string.

[r21522]

15 years agoWhen printing parentheses around a function declarator, print the closing parenthesis...
Christoph Mallon [Wed, 27 Aug 2008 17:31:42 +0000 (17:31 +0000)]
When printing parentheses around a function declarator, print the closing parenthesis after the parameter list, not before it.

[r21521]

15 years agoFix off-by-one error in source position of binary operations.
Christoph Mallon [Wed, 27 Aug 2008 15:00:33 +0000 (15:00 +0000)]
Fix off-by-one error in source position of binary operations.

[r21518]

15 years agoFix off-by-one error in source position of unary operations.
Christoph Mallon [Wed, 27 Aug 2008 14:24:52 +0000 (14:24 +0000)]
Fix off-by-one error in source position of unary operations.

[r21516]

15 years agoSimpler fix.
Christoph Mallon [Wed, 27 Aug 2008 14:19:24 +0000 (14:19 +0000)]
Simpler fix.

[r21515]

15 years agoFix last commit.
Christoph Mallon [Wed, 27 Aug 2008 14:15:42 +0000 (14:15 +0000)]
Fix last commit.

[r21514]

15 years agoSet the error type as result type, if semantic check of ++/-- fails.
Christoph Mallon [Wed, 27 Aug 2008 14:15:15 +0000 (14:15 +0000)]
Set the error type as result type, if semantic check of ++/-- fails.

[r21513]

15 years agoRecord the source position of unary postfix expressions.
Christoph Mallon [Wed, 27 Aug 2008 14:06:30 +0000 (14:06 +0000)]
Record the source position of unary postfix expressions.

[r21512]

15 years agoSlightly deuglify semantic_arithmetic().
Christoph Mallon [Wed, 27 Aug 2008 09:23:27 +0000 (09:23 +0000)]
Slightly deuglify semantic_arithmetic().

[r21499]

15 years agoCorrect printed source position of several error/warning messages.
Christoph Mallon [Wed, 27 Aug 2008 09:20:29 +0000 (09:20 +0000)]
Correct printed source position of several error/warning messages.

[r21498]

15 years agoSet the result type of !, even if the operand type is not scalar.
Christoph Mallon [Wed, 27 Aug 2008 09:07:41 +0000 (09:07 +0000)]
Set the result type of !, even if the operand type is not scalar.

[r21496]

15 years agoRepair semantics of !: Result type is int, not the operand type.
Christoph Mallon [Wed, 27 Aug 2008 09:03:14 +0000 (09:03 +0000)]
Repair semantics of !: Result type is int, not the operand type.

[r21494]

15 years agoSlightly improve warning about unreachable for-statements.
Christoph Mallon [Wed, 27 Aug 2008 08:59:30 +0000 (08:59 +0000)]
Slightly improve warning about unreachable for-statements.

[r21493]

15 years agoPass -MP on to the preprocessor.
Christoph Mallon [Wed, 27 Aug 2008 08:20:47 +0000 (08:20 +0000)]
Pass -MP on to the preprocessor.

[r21492]

15 years agoReplace case '0' till '9' by DIGITS macro.
Christoph Mallon [Mon, 25 Aug 2008 18:25:58 +0000 (18:25 +0000)]
Replace case '0' till '9' by DIGITS macro.

[r21458]

15 years agoAdvance the format string when seeing '*' for field width and precision.
Christoph Mallon [Mon, 25 Aug 2008 10:22:07 +0000 (10:22 +0000)]
Advance the format string when seeing '*' for field width and precision.

[r21436]

15 years agoUse only one error message for one error, refer to the previous source position in...
Christoph Mallon [Mon, 25 Aug 2008 08:44:19 +0000 (08:44 +0000)]
Use only one error message for one error, refer to the previous source position in the same message.

[r21433]

15 years agocheck_reachable() continued at the wrong position, when encountering a break statement.
Christoph Mallon [Mon, 25 Aug 2008 08:24:27 +0000 (08:24 +0000)]
check_reachable() continued at the wrong position, when encountering a break statement.

[r21432]

15 years agoImplement -Wmissing-noreturn.
Christoph Mallon [Mon, 25 Aug 2008 08:09:56 +0000 (08:09 +0000)]
Implement -Wmissing-noreturn.

[r21431]

15 years agoDo not dereference a NULL-pointer when there is no declaration while parsing an inner...
Christoph Mallon [Mon, 25 Aug 2008 08:08:13 +0000 (08:08 +0000)]
Do not dereference a NULL-pointer when there is no declaration while parsing an inner declarator.

[r21430]

15 years agoImplement -Wlong-long.
Christoph Mallon [Mon, 25 Aug 2008 07:42:30 +0000 (07:42 +0000)]
Implement -Wlong-long.

[r21429]

15 years agoImplement -Wnested-externs.
Christoph Mallon [Mon, 25 Aug 2008 07:27:04 +0000 (07:27 +0000)]
Implement -Wnested-externs.

[r21428]

15 years agoImplement -Wdeclaration-after-statement.
Christoph Mallon [Mon, 25 Aug 2008 07:06:40 +0000 (07:06 +0000)]
Implement -Wdeclaration-after-statement.

[r21427]

15 years agoPartially implement -Wdeprecated-declarations.
Christoph Mallon [Mon, 25 Aug 2008 06:41:20 +0000 (06:41 +0000)]
Partially implement -Wdeprecated-declarations.

[r21426]

15 years agoMerge declaration modifers when updating previous declaration.
Christoph Mallon [Mon, 25 Aug 2008 06:03:58 +0000 (06:03 +0000)]
Merge declaration modifers when updating previous declaration.

[r21425]

15 years agoDo not throw away declaration modifiers parsed in parse_inner_declarator().
Christoph Mallon [Mon, 25 Aug 2008 05:54:40 +0000 (05:54 +0000)]
Do not throw away declaration modifiers parsed in parse_inner_declarator().

[r21424]

15 years agoSort.
Christoph Mallon [Mon, 25 Aug 2008 05:34:02 +0000 (05:34 +0000)]
Sort.

[r21423]

15 years agoMake indenters a bit more happy.
Christoph Mallon [Sun, 24 Aug 2008 17:42:32 +0000 (17:42 +0000)]
Make indenters a bit more happy.

[r21418]

15 years agoRemove already handled TODO.
Christoph Mallon [Sun, 24 Aug 2008 17:38:22 +0000 (17:38 +0000)]
Remove already handled TODO.

[r21417]

15 years agoProperly detect unreachable code and when control flow reaches end of a non-void...
Christoph Mallon [Sun, 24 Aug 2008 17:32:35 +0000 (17:32 +0000)]
Properly detect unreachable code and when control flow reaches end of a non-void function.

[r21416]

15 years agoDo not crash, when encountering the default label while checking for duplicate case...
Christoph Mallon [Sun, 24 Aug 2008 17:29:37 +0000 (17:29 +0000)]
Do not crash, when encountering the default label while checking for duplicate case labels.

[r21415]

15 years agoFix building the list of case statements, i.e. update tail when appending.
Christoph Mallon [Sun, 24 Aug 2008 17:22:43 +0000 (17:22 +0000)]
Fix building the list of case statements, i.e. update tail when appending.

[r21414]

15 years agoRemove duplicate warning entry, sort.
Christoph Mallon [Sun, 24 Aug 2008 17:18:46 +0000 (17:18 +0000)]
Remove duplicate warning entry, sort.

[r21413]

15 years agoDetect duplicate case values.
Christoph Mallon [Sun, 24 Aug 2008 11:08:37 +0000 (11:08 +0000)]
Detect duplicate case values.

[r21403]

15 years agoForbid declarations after label, case and default statements.
Christoph Mallon [Sun, 24 Aug 2008 10:43:21 +0000 (10:43 +0000)]
Forbid declarations after label, case and default statements.

[r21400]

15 years agoUpdate TODO.
Christoph Mallon [Sun, 24 Aug 2008 10:28:17 +0000 (10:28 +0000)]
Update TODO.

[r21399]

15 years agoDo not use && in assertions.
Christoph Mallon [Sun, 24 Aug 2008 07:33:46 +0000 (07:33 +0000)]
Do not use && in assertions.

[r21397]

15 years agoreplaced malloc by VLA
Michael Beck [Sat, 23 Aug 2008 15:19:53 +0000 (15:19 +0000)]
replaced malloc by VLA

[r21386]

15 years agoAccept GNU-style designators ("identifier: value").
Christoph Mallon [Sat, 23 Aug 2008 11:18:45 +0000 (11:18 +0000)]
Accept GNU-style designators ("identifier: value").

[r21381]

15 years agoFirst print the error message about an unknown char, then proceed to the next char...
Christoph Mallon [Sat, 23 Aug 2008 10:17:47 +0000 (10:17 +0000)]
First print the error message about an unknown char, then proceed to the next char, so the unknown char is printed, not the next char.

[r21380]

15 years agoBehave more sane (i.e. do not spew implicit int warnings), when encountering garbage...
Christoph Mallon [Sat, 23 Aug 2008 10:14:36 +0000 (10:14 +0000)]
Behave more sane (i.e. do not spew implicit int warnings), when encountering garbage tokens outside of functions.

[r21379]

15 years agoAdd FALLTHROUGH marker.
Christoph Mallon [Sat, 23 Aug 2008 10:07:17 +0000 (10:07 +0000)]
Add FALLTHROUGH marker.

[r21378]

15 years agoTreat __thread as storage class.
Christoph Mallon [Sat, 23 Aug 2008 10:06:40 +0000 (10:06 +0000)]
Treat __thread as storage class.

[r21377]

15 years agoImprove eat_until_matching_token(), so it does not eat too much, when encountering...
Christoph Mallon [Sat, 23 Aug 2008 09:54:58 +0000 (09:54 +0000)]
Improve eat_until_matching_token(), so it does not eat too much, when encountering a matching ')', '}' or ']'.

[r21376]

15 years agoCleanup, resolve some warnings.
Christoph Mallon [Sat, 23 Aug 2008 09:10:35 +0000 (09:10 +0000)]
Cleanup, resolve some warnings.

[r21375]

15 years agoUse correct conversion specifier.
Christoph Mallon [Sat, 23 Aug 2008 08:03:22 +0000 (08:03 +0000)]
Use correct conversion specifier.

[r21374]

15 years agoHandle __attribute__((unused)).
Christoph Mallon [Sat, 23 Aug 2008 08:02:32 +0000 (08:02 +0000)]
Handle __attribute__((unused)).

[r21373]

15 years agoRemember a label, even if it is at the end of a compound statement.
Christoph Mallon [Sat, 23 Aug 2008 07:39:13 +0000 (07:39 +0000)]
Remember a label, even if it is at the end of a compound statement.

[r21372]

15 years agoAnother weird GCC extension: designated initialisation using colon.
Christoph Mallon [Sat, 23 Aug 2008 06:47:37 +0000 (06:47 +0000)]
Another weird GCC extension: designated initialisation using colon.

[r21371]

15 years agoReduce indendation.
Christoph Mallon [Fri, 22 Aug 2008 06:23:38 +0000 (06:23 +0000)]
Reduce indendation.

[r21337]

15 years agoPrevent printing redundant parentheses for array access, designators and non-printed...
Christoph Mallon [Fri, 22 Aug 2008 06:01:25 +0000 (06:01 +0000)]
Prevent printing redundant parentheses for array access, designators and non-printed implicit casts.

[r21336]

15 years agosynchronized with edgcpfe: enabled combo by default
Michael Beck [Thu, 21 Aug 2008 23:01:25 +0000 (23:01 +0000)]
synchronized with edgcpfe: enabled combo by default

[r21335]

15 years agoFix for inline assembler: According to the GCC documentation an 'asm' instruction...
Christoph Mallon [Thu, 21 Aug 2008 20:54:18 +0000 (20:54 +0000)]
Fix for inline assembler: According to the GCC documentation an 'asm' instruction without any output operands will be treated identically to a volatile 'asm' instruction.

[r21330]

15 years agoadd anchor token ')'
Michael Beck [Thu, 21 Aug 2008 12:58:25 +0000 (12:58 +0000)]
add anchor token ')'

[r21313]

15 years agocc_fixed is dead, all hail stickyness_sticky!
Christoph Mallon [Thu, 21 Aug 2008 10:57:35 +0000 (10:57 +0000)]
cc_fixed is dead, all hail stickyness_sticky!

[r21308]

15 years agoGCC ugliness: Allow lvalue casts in asm output constraints. TODO shoot GCC developers.
Christoph Mallon [Thu, 21 Aug 2008 10:43:43 +0000 (10:43 +0000)]
GCC ugliness: Allow lvalue casts in asm output constraints.  TODO shoot GCC developers.

[r21306]

15 years agoWarn about unnecessary static forward declarations.
Christoph Mallon [Thu, 21 Aug 2008 05:54:49 +0000 (05:54 +0000)]
Warn about unnecessary static forward declarations.

[r21299]

15 years agoWhen a calling convention is specified via attribute mark it as cc_fixed (broken...
Christoph Mallon [Thu, 21 Aug 2008 05:51:09 +0000 (05:51 +0000)]
When a calling convention is specified via attribute mark it as cc_fixed (broken in r21216).

[r21298]

15 years agoSlightly reduce code duplication.
Christoph Mallon [Wed, 20 Aug 2008 12:47:45 +0000 (12:47 +0000)]
Slightly reduce code duplication.

[r21280]

15 years agoFix r21226 ... ugh.
Christoph Mallon [Wed, 20 Aug 2008 12:43:33 +0000 (12:43 +0000)]
Fix r21226 ... ugh.

[r21278]

15 years agoCheck whether the declaration is not NULL before issuing a warning about using a...
Christoph Mallon [Wed, 20 Aug 2008 12:40:02 +0000 (12:40 +0000)]
Check whether the declaration is not NULL before issuing a warning about using a potentially uninitialised variable.

[r21277]

15 years agoDo not warn about a redundant declaration if a global static variable declaration...
Christoph Mallon [Wed, 20 Aug 2008 12:35:15 +0000 (12:35 +0000)]
Do not warn about a redundant declaration if a global static variable declaration is followed by a definition.

[r21276]

15 years agoWhitespace.
Christoph Mallon [Sun, 17 Aug 2008 09:53:38 +0000 (09:53 +0000)]
Whitespace.

[r21227]

15 years agoAdhere C99 §6.3.1.8: semantic_arithmetic() returned the wrong type for unsigned int...
Christoph Mallon [Sun, 17 Aug 2008 09:52:34 +0000 (09:52 +0000)]
Adhere C99 §6.3.1.8: semantic_arithmetic() returned the wrong type for unsigned int + long long.

[r21226]

15 years agocollect gnu expression attribute arguments
Michael Beck [Sun, 17 Aug 2008 07:30:55 +0000 (07:30 +0000)]
collect gnu expression attribute arguments

[r21225]

15 years agoCorrect comment.
Christoph Mallon [Sat, 16 Aug 2008 14:57:42 +0000 (14:57 +0000)]
Correct comment.

[r21223]

15 years agoDo not warn, that a second extern declaration for a function is redundant, if it...
Christoph Mallon [Sat, 16 Aug 2008 14:57:07 +0000 (14:57 +0000)]
Do not warn, that a second extern declaration for a function is redundant, if it is a function definition.

[r21222]

15 years agoRemove unnecessary goto.
Christoph Mallon [Sat, 16 Aug 2008 14:03:56 +0000 (14:03 +0000)]
Remove unnecessary goto.

[r21220]

15 years agofixed support for calling conventions:
Michael Beck [Sat, 16 Aug 2008 11:36:17 +0000 (11:36 +0000)]
fixed support for calling conventions:
- add them to function type
- issue error if more than one cc is used
- show them in type info

[r21216]

15 years ago- changing all typedef enum { ... } name; into typedef enum name { ... } name; greatl...
Michael Beck [Sat, 16 Aug 2008 10:48:07 +0000 (10:48 +0000)]
- changing all typedef enum { ... } name; into typedef enum name { ... } name; greatly improved the debugging experience ;-)

[r21215]

15 years ago- function types with different calling conventions are different
Michael Beck [Sat, 16 Aug 2008 10:43:23 +0000 (10:43 +0000)]
- function types with different calling conventions are different

[r21214]

15 years agoComply with §6.7.5.3(8).
Christoph Mallon [Sat, 16 Aug 2008 07:16:16 +0000 (07:16 +0000)]
Comply with §6.7.5.3(8).

[r21212]

15 years agocp_error048: C99 §6.7.5.3 clause 8: "A declaration of a parameter as ``function retur...
Christoph Mallon [Sat, 16 Aug 2008 07:03:31 +0000 (07:03 +0000)]
cp_error048: C99 §6.7.5.3 clause 8: "A declaration of a parameter as ``function returning type shall be adjusted to ``pointer to function returning type".

[r21211]

15 years agoDo not warn about an ununsed function, if it is marked with __attribute__((used)).
Christoph Mallon [Sat, 16 Aug 2008 06:48:48 +0000 (06:48 +0000)]
Do not warn about an ununsed function, if it is marked with __attribute__((used)).

[r21210]

15 years agoshould fail: variable with incomplete type.
Christoph Mallon [Fri, 15 Aug 2008 19:56:24 +0000 (19:56 +0000)]
should fail: variable with incomplete type.

[r21206]

15 years agoFix cp_error047.
Christoph Mallon [Fri, 15 Aug 2008 17:59:53 +0000 (17:59 +0000)]
Fix cp_error047.

[r21204]

15 years agocp_error047: struct definition for same name in inner scope.
Christoph Mallon [Fri, 15 Aug 2008 17:14:43 +0000 (17:14 +0000)]
cp_error047: struct definition for same name in inner scope.

[r21202]

15 years agoAdd support for global assembler statements.
Christoph Mallon [Fri, 15 Aug 2008 09:04:54 +0000 (09:04 +0000)]
Add support for global assembler statements.

[r21191]