cparser
16 years agothere might be extra commas after } initializer
Matthias Braun [Fri, 23 Nov 2007 00:38:47 +0000 (00:38 +0000)]
there might be extra commas after } initializer

[r18522]

16 years agomore missing skip_typerefs
Matthias Braun [Fri, 23 Nov 2007 00:35:15 +0000 (00:35 +0000)]
more missing skip_typerefs

[r18521]

16 years agosupport initializers for local variables with struct/array type
Matthias Braun [Fri, 23 Nov 2007 00:27:52 +0000 (00:27 +0000)]
support initializers for local variables with struct/array type

[r18520]

16 years agofix some bugs introduces with my last committ
Matthias Braun [Thu, 22 Nov 2007 23:59:27 +0000 (23:59 +0000)]
fix some bugs introduces with my last committ

[r18519]

16 years agofix array declarator parsing, fix a memory error in constructing declarator types
Matthias Braun [Thu, 22 Nov 2007 23:08:30 +0000 (23:08 +0000)]
fix array declarator parsing, fix a memory error in constructing declarator types

[r18518]

16 years agofix printing of array types
Matthias Braun [Thu, 22 Nov 2007 12:49:38 +0000 (12:49 +0000)]
fix printing of array types

[r18517]

16 years agomake enum entries use an expression instead of an initializer, set array type size...
Matthias Braun [Thu, 22 Nov 2007 12:35:51 +0000 (12:35 +0000)]
make enum entries use an expression instead of an initializer, set array type size from initializer if it wasn't specified

[r18516]

16 years agoimplement statement expressions
Matthias Braun [Thu, 22 Nov 2007 01:16:26 +0000 (01:16 +0000)]
implement statement expressions

[r18515]

16 years agosupport for alloca
Matthias Braun [Wed, 21 Nov 2007 18:25:04 +0000 (18:25 +0000)]
support for alloca

[r18514]

16 years agofix my last commit
Matthias Braun [Wed, 21 Nov 2007 18:05:57 +0000 (18:05 +0000)]
fix my last commit

[r18513]

16 years agosupport address taken from function parameters
Matthias Braun [Wed, 21 Nov 2007 17:54:38 +0000 (17:54 +0000)]
support address taken from function parameters

[r18512]

16 years agofix case/default labels with statement, add a dump commandline flag
Matthias Braun [Wed, 21 Nov 2007 17:39:49 +0000 (17:39 +0000)]
fix case/default labels with statement, add a dump commandline flag

[r18511]

16 years agoimplement 5[a] type array references
Matthias Braun [Wed, 21 Nov 2007 16:57:32 +0000 (16:57 +0000)]
implement 5[a] type array references

[r18510]

16 years agoadd -lz to libs...
Matthias Braun [Wed, 21 Nov 2007 16:56:30 +0000 (16:56 +0000)]
add -lz to libs...

[r18509]

16 years agoDivide by the element size in pointer - pointer expressions.
Christoph Mallon [Wed, 21 Nov 2007 16:52:30 +0000 (16:52 +0000)]
Divide by the element size in pointer - pointer expressions.

[r18508]

16 years agoTest for U and u instead of two times U in parse_integer_suffix().
Christoph Mallon [Wed, 21 Nov 2007 16:22:29 +0000 (16:22 +0000)]
Test for U and u instead of two times U in parse_integer_suffix().

[r18507]

16 years agoParse an integer suffix after a hex number.
Christoph Mallon [Wed, 21 Nov 2007 16:20:33 +0000 (16:20 +0000)]
Parse an integer suffix after a hex number.

[r18506]

16 years agoHexadecimal is base 16, not 36. (;
Christoph Mallon [Wed, 21 Nov 2007 16:17:36 +0000 (16:17 +0000)]
Hexadecimal is base 16, not 36. (;

[r18505]

16 years agoUse new_tarval_from_double() to create floating point constants.
Christoph Mallon [Wed, 21 Nov 2007 16:11:15 +0000 (16:11 +0000)]
Use new_tarval_from_double() to create floating point constants.

[r18504]

16 years agoimprove number lexing even more
Matthias Braun [Wed, 21 Nov 2007 00:32:23 +0000 (00:32 +0000)]
improve number lexing even more

[r18503]

16 years agoimprovements to number lexing
Matthias Braun [Wed, 21 Nov 2007 00:13:26 +0000 (00:13 +0000)]
improvements to number lexing

[r18502]

16 years agouse strtol/strtod for lexing numbers
Matthias Braun [Wed, 21 Nov 2007 00:02:49 +0000 (00:02 +0000)]
use strtol/strtod for lexing numbers

[r18501]

16 years agoimplement array intiailizers
Matthias Braun [Tue, 20 Nov 2007 21:25:18 +0000 (21:25 +0000)]
implement array intiailizers

[r18500]

16 years agoDo the "usual arithmetic conversions" for the second and third operand of the conditi...
Christoph Mallon [Tue, 20 Nov 2007 19:29:04 +0000 (19:29 +0000)]
Do the "usual arithmetic conversions" for the second and third operand of the conditional operator.

[r18499]

16 years agoHandle void expressions in conditional expressions.
Christoph Mallon [Tue, 20 Nov 2007 18:22:49 +0000 (18:22 +0000)]
Handle void expressions in conditional expressions.

[r18498]

16 years agoImplement __func__, __FUNCTION__ and __PRETTY_FUNCTION__.
Christoph Mallon [Tue, 20 Nov 2007 17:30:50 +0000 (17:30 +0000)]
Implement __func__, __FUNCTION__ and __PRETTY_FUNCTION__.

[r18497]

16 years agostarted implementing struct initializers in ast2firm
Matthias Braun [Tue, 20 Nov 2007 16:14:14 +0000 (16:14 +0000)]
started implementing struct initializers in ast2firm

[r18496]

16 years agoSimplify.
Christoph Mallon [Tue, 20 Nov 2007 14:19:40 +0000 (14:19 +0000)]
Simplify.

[r18495]

16 years agoFix warning.
Christoph Mallon [Tue, 20 Nov 2007 14:17:38 +0000 (14:17 +0000)]
Fix warning.

[r18494]

16 years agostrange structs
Matthias Braun [Mon, 19 Nov 2007 23:20:11 +0000 (23:20 +0000)]
strange structs

[r18493]

16 years agostarted working on correct initializer support (still unfinished and buggy!)
Matthias Braun [Mon, 19 Nov 2007 23:19:13 +0000 (23:19 +0000)]
started working on correct initializer support (still unfinished and buggy!)

[r18492]

16 years agoC99 has stupid rules sometimes...
Matthias Braun [Mon, 19 Nov 2007 22:48:36 +0000 (22:48 +0000)]
C99 has stupid rules sometimes...

[r18491]

16 years agostarted collecting some parser tests
Matthias Braun [Mon, 19 Nov 2007 20:40:43 +0000 (20:40 +0000)]
started collecting some parser tests

[r18490]

16 years agoThere is no need to pass -o - to the preprocessor.
Christoph Mallon [Mon, 19 Nov 2007 19:57:10 +0000 (19:57 +0000)]
There is no need to pass -o - to the preprocessor.

[r18489]

16 years agoInitialise the backend only once.
Christoph Mallon [Mon, 19 Nov 2007 19:44:52 +0000 (19:44 +0000)]
Initialise the backend only once.

[r18488]

16 years agos/be_set_debug_retrieve/ir_set_debug_retrieve/.
Christoph Mallon [Mon, 19 Nov 2007 19:38:40 +0000 (19:38 +0000)]
s/be_set_debug_retrieve/ir_set_debug_retrieve/.

[r18487]

16 years agoHandle Bad nodes in create_conv().
Christoph Mallon [Mon, 19 Nov 2007 13:57:44 +0000 (13:57 +0000)]
Handle Bad nodes in create_conv().

[r18486]

16 years agoImplement the GCC insani^Wextension __builtin_classify_type.
Christoph Mallon [Sun, 18 Nov 2007 13:56:38 +0000 (13:56 +0000)]
Implement the GCC insani^Wextension __builtin_classify_type.

[r18485]

16 years agocompound type specifiers can have __attribute__, too. Parse it (and ignore it for...
Christoph Mallon [Sun, 18 Nov 2007 12:24:04 +0000 (12:24 +0000)]
compound type specifiers can have __attribute__, too.  Parse it (and ignore it for now).

[r18484]

16 years agoArray as last part of a paramter type is just syntactic sugar. Turn it into a pointer.
Christoph Mallon [Sun, 18 Nov 2007 12:07:31 +0000 (12:07 +0000)]
Array as last part of a paramter type is just syntactic sugar.  Turn it into a pointer.

[r18483]

16 years agoAdd missing skip_typeref() in array_access_to_firm().
Christoph Mallon [Sun, 18 Nov 2007 11:43:06 +0000 (11:43 +0000)]
Add missing skip_typeref() in array_access_to_firm().

[r18482]

16 years agoReplace confusing if (c) return false; else return true; by simple boolean expression.
Christoph Mallon [Sun, 18 Nov 2007 11:38:07 +0000 (11:38 +0000)]
Replace confusing if (c) return false; else return true; by simple boolean expression.

[r18481]

16 years agoTypo in comment.
Christoph Mallon [Sun, 18 Nov 2007 11:37:28 +0000 (11:37 +0000)]
Typo in comment.

[r18480]

16 years agoAlso count arrays as local variables, because parameters can be declared in array...
Christoph Mallon [Sun, 18 Nov 2007 11:37:02 +0000 (11:37 +0000)]
Also count arrays as local variables, because parameters can be declared in array style.

[r18479]

16 years agoCount local variables for IR generation.
Christoph Mallon [Sun, 18 Nov 2007 11:28:47 +0000 (11:28 +0000)]
Count local variables for IR generation.

[r18478]

16 years agoIgnore -std=*.
Christoph Mallon [Sun, 18 Nov 2007 09:22:23 +0000 (09:22 +0000)]
Ignore -std=*.

[r18477]

16 years agoDo a localopt and cf opt after 64bit lowering to please the backend (ie. eliminate...
Christoph Mallon [Sun, 18 Nov 2007 09:15:45 +0000 (09:15 +0000)]
Do a localopt and cf opt after 64bit lowering to please the backend (ie. eliminate Bad CF predecessors).

[r18476]

16 years agoAdd the __func__ token.
Christoph Mallon [Sun, 18 Nov 2007 06:53:57 +0000 (06:53 +0000)]
Add the __func__ token.

[r18475]

16 years agoFix typos in comment.
Christoph Mallon [Sun, 18 Nov 2007 06:53:38 +0000 (06:53 +0000)]
Fix typos in comment.

[r18474]

16 years agos/#elseif/#elif/.
Christoph Mallon [Sun, 18 Nov 2007 06:53:14 +0000 (06:53 +0000)]
s/#elseif/#elif/.

[r18473]

16 years agotypos fixed
Michael Beck [Sat, 17 Nov 2007 23:22:06 +0000 (23:22 +0000)]
typos fixed

[r18472]

16 years agorenamed (reserved C++ keyword) namespace into namespc
Michael Beck [Sat, 17 Nov 2007 22:46:56 +0000 (22:46 +0000)]
renamed (reserved C++ keyword) namespace into namespc

[r18471]

16 years agolet PREPROCESSOR and LINK to be defined from outside
Michael Beck [Sat, 17 Nov 2007 22:46:11 +0000 (22:46 +0000)]
let PREPROCESSOR and LINK to be defined from outside
_WIN32 cpp does not support -o -

[r18470]

16 years agoadd NORETURN
Michael Beck [Sat, 17 Nov 2007 22:45:27 +0000 (22:45 +0000)]
add NORETURN

[r18469]

16 years agoDo no generate body blocks in the first place, when the body of a for- or while-loop...
Christoph Mallon [Sat, 17 Nov 2007 21:52:13 +0000 (21:52 +0000)]
Do no generate body blocks in the first place, when the body of a for- or while-loop is empty.

[r18468]

16 years agoThe then-part of an if-statement can be empty, too.
Christoph Mallon [Sat, 17 Nov 2007 21:31:09 +0000 (21:31 +0000)]
The then-part of an if-statement can be empty, too.

[r18467]

16 years agoThe bodies of do-while- and for-loops can be empty, too.
Christoph Mallon [Sat, 17 Nov 2007 21:23:21 +0000 (21:23 +0000)]
The bodies of do-while- and for-loops can be empty, too.

[r18466]

16 years agoThe body of a while statement can be empty.
Christoph Mallon [Sat, 17 Nov 2007 21:10:50 +0000 (21:10 +0000)]
The body of a while statement can be empty.

[r18465]

16 years agoHandle array + integer.
Christoph Mallon [Sat, 17 Nov 2007 21:09:15 +0000 (21:09 +0000)]
Handle array + integer.

[r18464]

16 years agoAllow assignment from arrays to pointers.
Christoph Mallon [Sat, 17 Nov 2007 20:49:55 +0000 (20:49 +0000)]
Allow assignment from arrays to pointers.

[r18463]

16 years agoDo 64bit lowering.
Christoph Mallon [Sat, 17 Nov 2007 20:10:52 +0000 (20:10 +0000)]
Do 64bit lowering.

[r18462]

16 years agoAdd missing skip_typeref() in select_to_firm().
Christoph Mallon [Sat, 17 Nov 2007 19:54:02 +0000 (19:54 +0000)]
Add missing skip_typeref() in select_to_firm().

[r18461]

16 years agoOperand of ! must be of scalar type (was too strict), operand of ~ must be of integer...
Christoph Mallon [Sat, 17 Nov 2007 19:51:03 +0000 (19:51 +0000)]
Operand of ! must be of scalar type (was too strict), operand of ~ must be of integer type (was too lax).

[r18460]

16 years agoGenerate IR for calling function pointers.
Christoph Mallon [Sat, 17 Nov 2007 19:40:31 +0000 (19:40 +0000)]
Generate IR for calling function pointers.

[r18459]

16 years agoAllow assignment from function designators to function pointers.
Christoph Mallon [Sat, 17 Nov 2007 19:33:31 +0000 (19:33 +0000)]
Allow assignment from function designators to function pointers.

[r18458]

16 years agoAllow calling function pointers.
Christoph Mallon [Sat, 17 Nov 2007 19:27:50 +0000 (19:27 +0000)]
Allow calling function pointers.

[r18457]

16 years agoImplement pointer arithmetic for += and -=. (Hopefully) fix pointer arithmetic for -.
Christoph Mallon [Sat, 17 Nov 2007 19:14:03 +0000 (19:14 +0000)]
Implement pointer arithmetic for += and -=.  (Hopefully) fix pointer arithmetic for -.

[r18456]

16 years agoFix r463.
Christoph Mallon [Sat, 17 Nov 2007 17:49:54 +0000 (17:49 +0000)]
Fix r463.

[r18455]

16 years agoPrint an explicit error for the attempt to assign to arrays.
Christoph Mallon [Sat, 17 Nov 2007 17:49:13 +0000 (17:49 +0000)]
Print an explicit error for the attempt to assign to arrays.

[r18454]

16 years agoFix r459: array_type_t is not pointer_type_t.
Christoph Mallon [Sat, 17 Nov 2007 17:29:37 +0000 (17:29 +0000)]
Fix r459: array_type_t is not pointer_type_t.

[r18453]

16 years agoInline load_from_expression_addr() into its only user.
Christoph Mallon [Sat, 17 Nov 2007 17:25:35 +0000 (17:25 +0000)]
Inline load_from_expression_addr() into its only user.

[r18452]

16 years agoHandle IR generation for dereferencing pointers to non-scalar types.
Christoph Mallon [Sat, 17 Nov 2007 17:21:55 +0000 (17:21 +0000)]
Handle IR generation for dereferencing pointers to non-scalar types.

[r18451]

16 years agoUnary * handles arrays, too. Improve the error message, when the argument is neither...
Christoph Mallon [Sat, 17 Nov 2007 17:20:21 +0000 (17:20 +0000)]
Unary * handles arrays, too.  Improve the error message, when the argument is neither an array nor a pointer.

[r18450]

16 years agouse short-circuit evaluation like the master taught us
Matthias Braun [Sat, 17 Nov 2007 16:56:56 +0000 (16:56 +0000)]
use short-circuit evaluation like the master taught us

[r18449]

16 years agoHandle IR generation for selection of non-scalar types from a compound type.
Christoph Mallon [Sat, 17 Nov 2007 16:56:22 +0000 (16:56 +0000)]
Handle IR generation for selection of non-scalar types from a compound type.

[r18448]

16 years agoHandle IR generation for access to global variables of compound type.
Christoph Mallon [Sat, 17 Nov 2007 16:35:53 +0000 (16:35 +0000)]
Handle IR generation for access to global variables of compound type.

[r18447]

16 years agoHandle IR generation for subscription of arrays with non-scalar element type.
Christoph Mallon [Sat, 17 Nov 2007 16:33:54 +0000 (16:33 +0000)]
Handle IR generation for subscription of arrays with non-scalar element type.

[r18446]

16 years ago&& and || accept scalar types, not only arithmetic types.
Christoph Mallon [Sat, 17 Nov 2007 15:49:03 +0000 (15:49 +0000)]
&& and || accept scalar types, not only arithmetic types.

[r18445]

16 years agoimplement ++ and -- for pointers
Matthias Braun [Sat, 17 Nov 2007 15:35:12 +0000 (15:35 +0000)]
implement ++ and -- for pointers

[r18444]

16 years agoHandle implicit casts from 0 to pointers in comparisons.
Christoph Mallon [Sat, 17 Nov 2007 14:40:38 +0000 (14:40 +0000)]
Handle implicit casts from 0 to pointers in comparisons.

[r18443]

16 years agoHandle implicit casts from 0 to pointers.
Christoph Mallon [Sat, 17 Nov 2007 14:00:26 +0000 (14:00 +0000)]
Handle implicit casts from 0 to pointers.

[r18442]

16 years agoUse skip_typeref() to determine the types in conditional expressions.
Christoph Mallon [Sat, 17 Nov 2007 13:27:29 +0000 (13:27 +0000)]
Use skip_typeref() to determine the types in conditional expressions.

[r18441]

16 years agoGenerate IR for /= and %=.
Christoph Mallon [Sat, 17 Nov 2007 12:36:23 +0000 (12:36 +0000)]
Generate IR for /= and %=.

[r18440]

16 years agoRemove redundant calls to error().
Christoph Mallon [Sat, 17 Nov 2007 12:17:41 +0000 (12:17 +0000)]
Remove redundant calls to error().

[r18439]

16 years agoHandle non-extern declarations after extern declarations correctly, warn about redund...
Christoph Mallon [Sat, 17 Nov 2007 12:14:32 +0000 (12:14 +0000)]
Handle non-extern declarations after extern declarations correctly, warn about redundant declarations, issue an error for multiple declarations with incompatible storage classes.

[r18438]

16 years ago__typeof__ is a GNU extension
Michael Beck [Sat, 17 Nov 2007 11:28:53 +0000 (11:28 +0000)]
__typeof__ is a GNU extension

[r18437]

16 years agoWarn about empty declarations.
Christoph Mallon [Sat, 17 Nov 2007 10:46:04 +0000 (10:46 +0000)]
Warn about empty declarations.

[r18436]

16 years agoIgnore parameters beginning with -D, -O or -f for now and print a warning.
Christoph Mallon [Sat, 17 Nov 2007 08:53:24 +0000 (08:53 +0000)]
Ignore parameters beginning with -D, -O or -f for now and print a warning.

[r18435]

16 years agoDo not set options which do not exist anymore.
Christoph Mallon [Sat, 17 Nov 2007 08:51:46 +0000 (08:51 +0000)]
Do not set options which do not exist anymore.

[r18434]

16 years agoadd some casts to suppress warnings
Michael Beck [Fri, 16 Nov 2007 23:26:13 +0000 (23:26 +0000)]
add some casts to suppress warnings

[r18433]

16 years agopreliminary Win32 support added
Michael Beck [Fri, 16 Nov 2007 23:25:29 +0000 (23:25 +0000)]
preliminary Win32 support added

[r18432]

16 years agouse new TYPE_QUALIFIER_NONE to suppress warning
Michael Beck [Fri, 16 Nov 2007 23:23:01 +0000 (23:23 +0000)]
use new TYPE_QUALIFIER_NONE to suppress warning

[r18431]

16 years agoadd TYPE_QUALIFIER_NONE to suppress warnings (use it instead of 0)
Michael Beck [Fri, 16 Nov 2007 23:21:34 +0000 (23:21 +0000)]
add TYPE_QUALIFIER_NONE to suppress warnings (use it instead of 0)

[r18430]

16 years agoremoved abort() declaration, use from stdlib.h
Michael Beck [Fri, 16 Nov 2007 23:20:20 +0000 (23:20 +0000)]
removed abort() declaration, use from stdlib.h

[r18429]

16 years agoit's __GNUC__ not __GCC__
Matthias Braun [Fri, 16 Nov 2007 23:16:03 +0000 (23:16 +0000)]
it's __GNUC__ not __GCC__

[r18428]

16 years agoHandle fallthrough when generating IR for case labels.
Christoph Mallon [Fri, 16 Nov 2007 23:01:46 +0000 (23:01 +0000)]
Handle fallthrough when generating IR for case labels.

[r18427]

16 years agoMake sure to generate a default ProjX for switch()es, even if there is no default...
Christoph Mallon [Fri, 16 Nov 2007 22:42:21 +0000 (22:42 +0000)]
Make sure to generate a default ProjX for switch()es, even if there is no default: label.

[r18426]

16 years ago__attribute__ is a GCC extension
Michael Beck [Fri, 16 Nov 2007 22:38:55 +0000 (22:38 +0000)]
__attribute__ is a GCC extension

[r18425]

16 years agoParse octal escape sequences correctly: Do not swallow the first digit and read at...
Christoph Mallon [Fri, 16 Nov 2007 22:07:04 +0000 (22:07 +0000)]
Parse octal escape sequences correctly: Do not swallow the first digit and read at most three digits.

[r18424]

16 years agofix bug in my last commit
Matthias Braun [Fri, 16 Nov 2007 21:23:21 +0000 (21:23 +0000)]
fix bug in my last commit

[r18423]