cparser
12 years agoUse streq() instead of strcmp() == 0.
Christoph Mallon [Wed, 14 Sep 2011 09:10:48 +0000 (11:10 +0200)]
Use streq() instead of strcmp() == 0.

12 years agoUse strstart() instead of strncmp().
Christoph Mallon [Wed, 14 Sep 2011 09:02:50 +0000 (11:02 +0200)]
Use strstart() instead of strncmp().

12 years agoChange strcmp_underscore() to streq_underscore().
Christoph Mallon [Wed, 14 Sep 2011 08:41:31 +0000 (10:41 +0200)]
Change strcmp_underscore() to streq_underscore().

12 years agoMerge the two copies of strcmp_underscore().
Christoph Mallon [Wed, 14 Sep 2011 08:38:18 +0000 (10:38 +0200)]
Merge the two copies of strcmp_underscore().

12 years agoCorrect checking for well known functions: Properly check for __builtin_ prefix.
Christoph Mallon [Wed, 14 Sep 2011 07:20:14 +0000 (09:20 +0200)]
Correct checking for well known functions: Properly check for __builtin_ prefix.

The code checked for _..uiltin_ (. being arbitrary chars) or even crashed on strings shorter than 3 chars.

12 years agoFurther correct re-typedef in C++: Even in system headers only identical (not just...
Christoph Mallon [Wed, 14 Sep 2011 07:15:53 +0000 (09:15 +0200)]
Further correct re-typedef in C++: Even in system headers only identical (not just compatible) typedefs are allowed.

12 years agoMove function descriptions into headers.
Christoph Mallon [Wed, 14 Sep 2011 07:05:25 +0000 (09:05 +0200)]
Move function descriptions into headers.

12 years agoUpdate libfirm submodule reference
Andreas Zwinkau [Tue, 13 Sep 2011 14:55:43 +0000 (16:55 +0200)]
Update libfirm submodule reference

12 years agoadd special treatment for known setjmp/longjmp function names
Matthias Braun [Tue, 13 Sep 2011 11:28:15 +0000 (13:28 +0200)]
add special treatment for known setjmp/longjmp function names

12 years agonoreturn, returns_twice, nothrow are method-type attributes
Matthias Braun [Tue, 13 Sep 2011 11:28:55 +0000 (13:28 +0200)]
noreturn, returns_twice, nothrow are method-type attributes

12 years agoPass -s flag to linker.
Sebastian Buchwald [Tue, 13 Sep 2011 07:45:39 +0000 (09:45 +0200)]
Pass -s flag to linker.

12 years agoFixed typo.
Sebastian Buchwald [Tue, 13 Sep 2011 06:41:52 +0000 (08:41 +0200)]
Fixed typo.

12 years agofix/improve double typedef exceptions
Matthias Braun [Mon, 12 Sep 2011 08:59:06 +0000 (10:59 +0200)]
fix/improve double typedef exceptions

12 years agopass -w flag on to preprocessor
Matthias Braun [Tue, 6 Sep 2011 15:25:42 +0000 (17:25 +0200)]
pass -w flag on to preprocessor

12 years agoThe typeof-type is always set, no need to check and use the expression's type as...
Christoph Mallon [Sat, 10 Sep 2011 10:16:32 +0000 (12:16 +0200)]
The typeof-type is always set, no need to check and use the expression's type as fallback.

12 years agoMake get_type_alignment_compound() static.
Christoph Mallon [Sat, 10 Sep 2011 09:42:06 +0000 (11:42 +0200)]
Make get_type_alignment_compound() static.

12 years agoMake sure that get_type_alignment() is not passed a typedef.
Christoph Mallon [Sat, 10 Sep 2011 09:39:05 +0000 (11:39 +0200)]
Make sure that get_type_alignment() is not passed a typedef.

12 years agoUpdate libfirm submodule reference
Andreas Zwinkau [Tue, 6 Sep 2011 10:26:48 +0000 (12:26 +0200)]
Update libfirm submodule reference

12 years agoparse line-directive flags to detect system headers
Matthias Braun [Mon, 5 Sep 2011 17:53:22 +0000 (19:53 +0200)]
parse line-directive flags to detect system headers

In system headers we disable the redundant decl warning and the
redefinition error for typedefs

12 years agoremove unfinished preproc directive parsing code
Matthias Braun [Mon, 5 Sep 2011 17:02:20 +0000 (19:02 +0200)]
remove unfinished preproc directive parsing code

12 years agoThe variants of advance_current_object() and descend_into_subtype() in ast2firm must...
Christoph Mallon [Mon, 5 Sep 2011 11:04:03 +0000 (13:04 +0200)]
The variants of advance_current_object() and descend_into_subtype() in ast2firm must use skip_unnamed_bitfields(), too.

12 years agoSkip unnamed bitfield in descend_into_subtype() and advance_current_object().
Christoph Mallon [Sat, 3 Sep 2011 15:28:11 +0000 (17:28 +0200)]
Skip unnamed bitfield in descend_into_subtype() and advance_current_object().

Unnamed bitfields cannot be initialized, so they must be skipped.

12 years agoCorrect copy&paste error.
Christoph Mallon [Sat, 3 Sep 2011 09:09:42 +0000 (11:09 +0200)]
Correct copy&paste error.

The case above handles long long, this one is about unsigned long long.

12 years agoThe struct alignment of long double on 32 bit Darwin is 16 bytes.
Christoph Mallon [Sat, 3 Sep 2011 08:54:08 +0000 (10:54 +0200)]
The struct alignment of long double on 32 bit Darwin is 16 bytes.

12 years agoThe struct alignment of (unsigned) long long on 32 bit Darwin is 4 bytes.
Christoph Mallon [Sat, 3 Sep 2011 08:51:53 +0000 (10:51 +0200)]
The struct alignment of (unsigned) long long on 32 bit Darwin is 4 bytes.

12 years agoAdapted cparser to CopyB lowering changes.
Manuel Mohr [Wed, 31 Aug 2011 17:37:35 +0000 (19:37 +0200)]
Adapted cparser to CopyB lowering changes.

12 years agoPass -msoft-float to linker so that the correct libraries are linked.
Manuel Mohr [Fri, 26 Aug 2011 12:30:05 +0000 (14:30 +0200)]
Pass -msoft-float to linker so that the correct libraries are linked.

12 years agoEnable the usage of different firm variants
Andreas Zwinkau [Fri, 8 Apr 2011 14:33:07 +0000 (16:33 +0200)]
Enable the usage of different firm variants

12 years agoDownload libfirm release if no submodule present
Andreas Zwinkau [Thu, 10 Mar 2011 21:24:54 +0000 (22:24 +0100)]
Download libfirm release if no submodule present

Fallback for tarball version

Set to version 1.19.1, as this will not work with
the current 1.18.1 anyways.

12 years agoUse submodule for libfirm binding
Andreas Zwinkau [Thu, 10 Mar 2011 17:40:59 +0000 (18:40 +0100)]
Use submodule for libfirm binding

cparser usually depends on a specific libfirm revision,
so it makes sense to target a specific one via submodules.

12 years agoGenerate revision from git describe
Andreas Zwinkau [Mon, 6 Jun 2011 13:28:13 +0000 (15:28 +0200)]
Generate revision from git describe

12 years agoadapt to firm va_start changes
Matthias Braun [Mon, 22 Aug 2011 14:17:25 +0000 (16:17 +0200)]
adapt to firm va_start changes

12 years agoSimplify sizeof(x) / sizeof(x[0]) to lengthof(x).
Christoph Mallon [Fri, 19 Aug 2011 06:48:55 +0000 (08:48 +0200)]
Simplify sizeof(x) / sizeof(x[0]) to lengthof(x).

12 years agoSimplify iterating over opts[].
Christoph Mallon [Fri, 19 Aug 2011 06:58:00 +0000 (08:58 +0200)]
Simplify iterating over opts[].

12 years agoMerge timers[] into opts[].
Christoph Mallon [Fri, 19 Aug 2011 06:55:15 +0000 (08:55 +0200)]
Merge timers[] into opts[].

12 years agoCorrect size, alignment and rank of long long and unsigned long long.
Christoph Mallon [Thu, 18 Aug 2011 17:50:31 +0000 (19:50 +0200)]
Correct size, alignment and rank of long long and unsigned long long.

12 years agoPrevent duplicate entity for variadic paramters.
Christoph Mallon [Wed, 17 Aug 2011 17:20:54 +0000 (19:20 +0200)]
Prevent duplicate entity for variadic paramters.

12 years agoSelect n+1st parameter for va_start.
Christoph Mallon [Wed, 17 Aug 2011 17:20:31 +0000 (19:20 +0200)]
Select n+1st parameter for va_start.

12 years agosimplify builtin infrastructure
Matthias Braun [Wed, 17 Aug 2011 11:45:52 +0000 (13:45 +0200)]
simplify builtin infrastructure

12 years agorework atomic and related types
Matthias Braun [Tue, 16 Aug 2011 11:17:40 +0000 (13:17 +0200)]
rework atomic and related types

rank is now put in atomic_type_properties, enum, imaginar, complex have
been merged to use atomic_type_t as a base, allowing lots of code to
treat them the same.

12 years agoAdd missing operand promotion of unary integer expressions.
Christoph Mallon [Tue, 16 Aug 2011 16:49:44 +0000 (18:49 +0200)]
Add missing operand promotion of unary integer expressions.

12 years agoAdapt cpu_arch after processing a target tripel.
Sebastian Buchwald [Tue, 16 Aug 2011 14:35:00 +0000 (16:35 +0200)]
Adapt cpu_arch after processing a target tripel.

12 years agoAdapt to libFirm API
Andreas Zwinkau [Tue, 16 Aug 2011 13:30:06 +0000 (15:30 +0200)]
Adapt to libFirm API

12 years agoCorrect integer conversion rank of _Bool.
Christoph Mallon [Mon, 15 Aug 2011 17:21:10 +0000 (19:21 +0200)]
Correct integer conversion rank of _Bool.

It should be the lowest of all integer types, not the heighest.
This corrects C/bool3.c.

12 years agofix write_only{12,13}.c testcases
Matthias Braun [Sat, 13 Aug 2011 13:28:17 +0000 (15:28 +0200)]
fix write_only{12,13}.c testcases

12 years agoremove more unnecessary XXX_INVALID constants
Matthias Braun [Sat, 13 Aug 2011 12:00:20 +0000 (14:00 +0200)]
remove more unnecessary XXX_INVALID constants

12 years agoremove ENTITY_INVALID
Matthias Braun [Sat, 13 Aug 2011 11:55:29 +0000 (13:55 +0200)]
remove ENTITY_INVALID

12 years agorename STATEMENT_INVALID to STATEMENT_ERROR
Matthias Braun [Sat, 13 Aug 2011 11:52:58 +0000 (13:52 +0200)]
rename STATEMENT_INVALID to STATEMENT_ERROR

12 years agoremove EXPR_INVALID, EXPR_ERROR is enough
Matthias Braun [Sat, 13 Aug 2011 11:47:18 +0000 (13:47 +0200)]
remove EXPR_INVALID, EXPR_ERROR is enough

12 years agoremove TYPE_INVALID, TYPE_ERROR is enough
Matthias Braun [Sat, 13 Aug 2011 11:41:24 +0000 (13:41 +0200)]
remove TYPE_INVALID, TYPE_ERROR is enough

12 years agodo not crash when printing implicit union/struct selects
Matthias Braun [Fri, 12 Aug 2011 18:54:07 +0000 (20:54 +0200)]
do not crash when printing implicit union/struct selects

12 years agoperform an additional CopyB lowering step as lower_calls can introduce new ones
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

12 years agodifferentiate between EXPR_INVALID and EXPR_ERROR
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.

12 years agogive stray-semicolon warning a name
Matthias Braun [Fri, 12 Aug 2011 09:20:16 +0000 (11:20 +0200)]
give stray-semicolon warning a name

12 years agoWe now support -msoft-float.
Sebastian Buchwald [Tue, 12 Jul 2011 13:17:24 +0000 (15:17 +0200)]
We now support -msoft-float.

12 years agoimplement some missing builtin variants
Matthias Braun [Fri, 12 Aug 2011 08:56:27 +0000 (10:56 +0200)]
implement some missing builtin variants

12 years agoimplement -Wempty-body and -Wignored-qualifiers and ignore some more gcc warnings
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

12 years agofix walking code trying to dereference some NULL pointers
Matthias Braun [Fri, 12 Aug 2011 07:22:34 +0000 (09:22 +0200)]
fix walking code trying to dereference some NULL pointers

12 years agorework input logic to allow parsing from strings
Matthias Braun [Thu, 11 Aug 2011 23:28:40 +0000 (01:28 +0200)]
rework input logic to allow parsing from strings

12 years agoimprove ast-walk infrastructure
Matthias Braun [Thu, 11 Aug 2011 21:02:49 +0000 (23:02 +0200)]
improve ast-walk infrastructure

12 years agoremove old EXPR_UNKNOWN artifact
Matthias Braun [Thu, 11 Aug 2011 19:59:57 +0000 (21:59 +0200)]
remove old EXPR_UNKNOWN artifact

12 years agofix bug: not all unixes are ia32
Matthias Braun [Thu, 11 Aug 2011 19:34:21 +0000 (21:34 +0200)]
fix bug: not all unixes are ia32

12 years agoFix C/folderror
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.

12 years agorework architecture specific type handling
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

12 years agobitfields are an entity attribute now, not a type
Matthias Braun [Tue, 9 Aug 2011 13:14:51 +0000 (15:14 +0200)]
bitfields are an entity attribute now, not a type

12 years agopreprocessor: escape sequence, octal parsing in utf32
Matthias Braun [Tue, 9 Aug 2011 09:11:14 +0000 (11:11 +0200)]
preprocessor: escape sequence, octal parsing in utf32

12 years agomove grow_symbol function into unicode.h
Matthias Braun [Tue, 26 Jul 2011 12:58:14 +0000 (14:58 +0200)]
move grow_symbol function into unicode.h

12 years agotransform token_t into a union (similar to ast-nodes)
Matthias Braun [Tue, 26 Jul 2011 12:50:42 +0000 (14:50 +0200)]
transform token_t into a union (similar to ast-nodes)

12 years agostart working on include searchpath management
Matthias Braun [Mon, 25 Jul 2011 13:16:10 +0000 (15:16 +0200)]
start working on include searchpath management

12 years agofix pp_definition not being initialized in a symbol
Matthias Braun [Mon, 25 Jul 2011 13:14:50 +0000 (15:14 +0200)]
fix pp_definition not being initialized in a symbol

12 years agoredo preprocessor output concerning spaces,newlines
Matthias Braun [Tue, 19 Jul 2011 10:30:23 +0000 (12:30 +0200)]
redo preprocessor output concerning spaces,newlines

12 years agodo not add searchpath stuff into parse_headername
Matthias Braun [Tue, 19 Jul 2011 10:29:27 +0000 (12:29 +0200)]
do not add searchpath stuff into parse_headername

12 years agofix preprocessing token registration
Matthias Braun [Mon, 18 Jul 2011 17:51:54 +0000 (19:51 +0200)]
fix preprocessing token registration

12 years agoupdate preprocessor tests
Matthias Braun [Mon, 18 Jul 2011 17:32:12 +0000 (19:32 +0200)]
update preprocessor tests

12 years agoadapt preprocessor to coding standards
Matthias Braun [Mon, 18 Jul 2011 17:13:03 +0000 (19:13 +0200)]
adapt preprocessor to coding standards

12 years agopreprocessor: cleanup, use new input functions
Matthias Braun [Mon, 18 Jul 2011 17:10:38 +0000 (19:10 +0200)]
preprocessor: cleanup, use new input functions

12 years agofactor out input-reading code from lexer.c into input.c
Matthias Braun [Mon, 18 Jul 2011 13:56:14 +0000 (15:56 +0200)]
factor out input-reading code from lexer.c into input.c

12 years agoremove support for compiler-builtin c-code (it was broken anyway and never produced...
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)

12 years agoadapt to firm taking of parameter address changes
Matthias Braun [Wed, 23 Mar 2011 18:06:14 +0000 (19:06 +0100)]
adapt to firm taking of parameter address changes

12 years agoGCC compatibility: Parse attributes after labels in C mode.
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.

12 years agoIncrease size of anchor token counters.
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.

12 years agoRemove unused macro.
Christoph Mallon [Fri, 29 Jul 2011 08:59:01 +0000 (10:59 +0200)]
Remove unused macro.

12 years agouse bool flag instead of UNARY_CAST_IMPLICIT
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

12 years agofix a few warnings reported by cparser
Matthias Braun [Thu, 14 Jul 2011 08:27:07 +0000 (10:27 +0200)]
fix a few warnings reported by cparser

12 years ago-Winit-self is useless (and produces wrong warnings), remove it and make it a compati...
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

12 years agoSupport maximum field width in scanf() check.
Christoph Mallon [Fri, 8 Jul 2011 11:53:45 +0000 (13:53 +0200)]
Support maximum field width in scanf() check.

12 years agoRemove dead assignment.
Christoph Mallon [Fri, 8 Jul 2011 11:52:12 +0000 (13:52 +0200)]
Remove dead assignment.

12 years agoSupport '*' (suppress assignment) in scanf() check.
Christoph Mallon [Fri, 8 Jul 2011 11:46:36 +0000 (13:46 +0200)]
Support '*' (suppress assignment) in scanf() check.

12 years agoscanf({"%c","%lc"}) requieres a pointer to {char,wchar_t}, not {int,wint_t}.
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}.

12 years agoRemove duplicate test.
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'.

12 years agoReduce code duplication.
Christoph Mallon [Fri, 8 Jul 2011 10:10:51 +0000 (12:10 +0200)]
Reduce code duplication.

12 years agoOoops, streq is the right function here.
Sebastian Buchwald [Fri, 8 Jul 2011 11:41:56 +0000 (13:41 +0200)]
Ooops, streq is the right function here.

12 years agoOops, fixed compile error.
Sebastian Buchwald [Fri, 8 Jul 2011 11:29:05 +0000 (13:29 +0200)]
Oops, fixed compile error.

12 years agoUse an example from the list above.
Sebastian Buchwald [Fri, 8 Jul 2011 08:10:19 +0000 (10:10 +0200)]
Use an example from the list above.

12 years agoDo not parse meaningless fno-... options.
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

12 years agoAdded missing help entry.
Sebastian Buchwald [Fri, 8 Jul 2011 07:41:14 +0000 (09:41 +0200)]
Added missing help entry.

12 years agoConsistently use upper case in help text.
Sebastian Buchwald [Fri, 8 Jul 2011 07:08:28 +0000 (09:08 +0200)]
Consistently use upper case in help text.

12 years agoReplaced n't by not.
Sebastian Buchwald [Fri, 8 Jul 2011 07:06:35 +0000 (09:06 +0200)]
Replaced n't by not.

12 years agoImproved help message.
Sebastian Buchwald [Thu, 7 Jul 2011 11:16:52 +0000 (13:16 +0200)]
Improved help message.

12 years agoOne help entry for -ffp-precise is sufficient.
Sebastian Buchwald [Thu, 7 Jul 2011 11:16:00 +0000 (13:16 +0200)]
One help entry for -ffp-precise is sufficient.