cparser
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]

15 years agouse first token as symbol
Matthias Braun [Fri, 15 Aug 2008 07:36:45 +0000 (07:36 +0000)]
use first token as symbol

[r21190]

15 years agoadd cc field to function types
Michael Beck [Wed, 13 Aug 2008 10:57:30 +0000 (10:57 +0000)]
add cc field to function types

[r21140]

15 years agoProcess MS and GNU attributes for specifying the calling convention. TODO: needs...
Christoph Mallon [Wed, 13 Aug 2008 10:25:49 +0000 (10:25 +0000)]
Process MS and GNU attributes for specifying the calling convention.  TODO: needs heaps of error checking.

[r21139]

15 years ago- factor out setting of entity attributes
Michael Beck [Wed, 13 Aug 2008 08:50:47 +0000 (08:50 +0000)]
- factor out setting of entity attributes
- add support for __attribute__((pure)) specifier

[r21136]

15 years agoHandle __attribute__((used)) for functions, i.e. make the function entity sticky.
Christoph Mallon [Wed, 13 Aug 2008 07:28:32 +0000 (07:28 +0000)]
Handle __attribute__((used)) for functions, i.e. make the function entity sticky.

[r21135]

15 years agofix for mode attribute stuff
Matthias Braun [Tue, 12 Aug 2008 13:35:43 +0000 (13:35 +0000)]
fix for mode attribute stuff

[r21124]

15 years agofirst hacked implementation of mode attribute
Matthias Braun [Tue, 12 Aug 2008 13:16:55 +0000 (13:16 +0000)]
first hacked implementation of mode attribute

[r21122]

15 years agomore testcases
Matthias Braun [Tue, 12 Aug 2008 13:16:42 +0000 (13:16 +0000)]
more testcases

[r21121]

15 years agoignore -fPIC, one more missing skip_typeref
Matthias Braun [Tue, 12 Aug 2008 11:38:08 +0000 (11:38 +0000)]
ignore -fPIC, one more missing skip_typeref

[r21119]

15 years agoerror46
Matthias Braun [Tue, 12 Aug 2008 11:17:27 +0000 (11:17 +0000)]
error46

[r21116]

15 years agoif( to if (
Matthias Braun [Tue, 12 Aug 2008 08:44:07 +0000 (08:44 +0000)]
if( to if (

[r21112]

15 years agocall set_store first before (potentially) creating stores
Matthias Braun [Tue, 12 Aug 2008 08:43:56 +0000 (08:43 +0000)]
call set_store first before (potentially) creating stores

[r21111]

15 years agoFix indentation.
Christoph Mallon [Sat, 9 Aug 2008 07:34:10 +0000 (07:34 +0000)]
Fix indentation.

[r21077]

15 years agoFix indentation.
Christoph Mallon [Sat, 9 Aug 2008 07:33:43 +0000 (07:33 +0000)]
Fix indentation.

[r21076]

15 years agoFix comment.
Christoph Mallon [Sat, 9 Aug 2008 07:33:09 +0000 (07:33 +0000)]
Fix comment.

[r21075]

15 years agoWarn about extra { before a scalar initialiser at the {, not one token after it.
Christoph Mallon [Sat, 9 Aug 2008 07:13:19 +0000 (07:13 +0000)]
Warn about extra { before a scalar initialiser at the {, not one token after it.

[r21074]

15 years agoAccept (but ignore and warn about) MS-style declaration modifiers (cp_error045).
Christoph Mallon [Fri, 8 Aug 2008 08:33:55 +0000 (08:33 +0000)]
Accept (but ignore and warn about) MS-style declaration modifiers (cp_error045).

[r21062]

15 years agoAllow attributes before/between/after * in declarators (partially fixing cp_error045).
Christoph Mallon [Fri, 8 Aug 2008 07:54:31 +0000 (07:54 +0000)]
Allow attributes before/between/after * in declarators (partially fixing cp_error045).

[r21060]

15 years agocp_error045: winnt.h needs a pointer type to a stdcall function
Moritz Kroll [Fri, 8 Aug 2008 00:39:37 +0000 (00:39 +0000)]
cp_error045: winnt.h needs a pointer type to a stdcall function

[r21057]

15 years agoDo not pretend being __STRICT_ANSI__.
Christoph Mallon [Thu, 7 Aug 2008 16:06:38 +0000 (16:06 +0000)]
Do not pretend being __STRICT_ANSI__.

[r21054]

15 years agoAllow perverted case: Be lenient when a function is declared inline, but there is...
Christoph Mallon [Thu, 7 Aug 2008 15:25:25 +0000 (15:25 +0000)]
Allow perverted case: Be lenient when a function is declared inline, but there is not body in the translation unit.

[r21053]

15 years agoFix typo.
Christoph Mallon [Thu, 7 Aug 2008 15:23:36 +0000 (15:23 +0000)]
Fix typo.

[r21052]

15 years agoUse local variables for better readability.
Christoph Mallon [Thu, 7 Aug 2008 15:16:24 +0000 (15:16 +0000)]
Use local variables for better readability.

[r21051]

15 years agoinvalid use of inline (which gcc handles anyway)
Matthias Braun [Thu, 7 Aug 2008 14:44:59 +0000 (14:44 +0000)]
invalid use of inline (which gcc handles anyway)

[r21049]

15 years agoskip_typref().
Christoph Mallon [Thu, 7 Aug 2008 14:26:07 +0000 (14:26 +0000)]
skip_typref().

[r21048]

15 years agoCorrectly handle the result type of conditional expressions, when (void*)0 (a null...
Christoph Mallon [Thu, 7 Aug 2008 14:19:45 +0000 (14:19 +0000)]
Correctly handle the result type of conditional expressions, when (void*)0 (a null pointer constant) is used.

[r21047]

15 years agoThe attribute __align__ may be used without an argument.
Christoph Mallon [Thu, 7 Aug 2008 14:04:05 +0000 (14:04 +0000)]
The attribute __align__ may be used without an argument.

[r21046]

15 years agobetter fix
Matthias Braun [Thu, 7 Aug 2008 12:39:17 +0000 (12:39 +0000)]
better fix

[r21045]

15 years agofix for error44
Matthias Braun [Thu, 7 Aug 2008 12:35:18 +0000 (12:35 +0000)]
fix for error44

[r21044]

15 years agoerror44
Matthias Braun [Thu, 7 Aug 2008 12:27:02 +0000 (12:27 +0000)]
error44

[r21043]

15 years agofix error43
Matthias Braun [Thu, 7 Aug 2008 12:19:02 +0000 (12:19 +0000)]
fix error43

[r21042]

15 years agoone more error
Matthias Braun [Thu, 7 Aug 2008 12:11:56 +0000 (12:11 +0000)]
one more error

[r21040]

15 years agoadd & fix constexpr4
Matthias Braun [Thu, 7 Aug 2008 11:59:11 +0000 (11:59 +0000)]
add & fix constexpr4

[r21038]

15 years agomore constexpr fun
Matthias Braun [Thu, 7 Aug 2008 11:49:51 +0000 (11:49 +0000)]
more constexpr fun

[r21036]

15 years agofix error42
Matthias Braun [Thu, 7 Aug 2008 11:45:27 +0000 (11:45 +0000)]
fix error42

[r21034]

15 years agoerrro42
Matthias Braun [Thu, 7 Aug 2008 11:14:48 +0000 (11:14 +0000)]
errro42

[r21031]

15 years agofix missing skip_typerefs
Matthias Braun [Thu, 7 Aug 2008 11:00:03 +0000 (11:00 +0000)]
fix missing skip_typerefs

[r21030]

15 years agofix for last commit
Matthias Braun [Thu, 7 Aug 2008 10:56:27 +0000 (10:56 +0000)]
fix for last commit

[r21029]

15 years agofix crashs in error case
Matthias Braun [Thu, 7 Aug 2008 10:33:59 +0000 (10:33 +0000)]
fix crashs in error case

[r21028]

15 years agoSlightly simplify token declarations.
Christoph Mallon [Thu, 7 Aug 2008 10:22:07 +0000 (10:22 +0000)]
Slightly simplify token declarations.

[r21027]

15 years agofix parsing of attributes with keyword names
Matthias Braun [Thu, 7 Aug 2008 07:40:30 +0000 (07:40 +0000)]
fix parsing of attributes with keyword names

[r21025]

15 years agohacky implementation of transparent union
Matthias Braun [Thu, 7 Aug 2008 07:25:19 +0000 (07:25 +0000)]
hacky implementation of transparent union

[r21024]

15 years agoimplement transparent_union
Matthias Braun [Wed, 6 Aug 2008 16:32:26 +0000 (16:32 +0000)]
implement transparent_union

[r21021]

15 years agoimprove tester
Matthias Braun [Wed, 6 Aug 2008 16:27:21 +0000 (16:27 +0000)]
improve tester

[r21020]

15 years agosimplify testcase
Matthias Braun [Wed, 6 Aug 2008 16:26:13 +0000 (16:26 +0000)]
simplify testcase

[r21019]

15 years agoImprove type checking for conditional expressions with pointer types (... ? ptr0...
Christoph Mallon [Wed, 6 Aug 2008 11:30:35 +0000 (11:30 +0000)]
Improve type checking for conditional expressions with pointer types (... ? ptr0 : ptr1), though not finished.

[r21011]

15 years agomore tests
Matthias Braun [Wed, 6 Aug 2008 10:45:00 +0000 (10:45 +0000)]
more tests

[r21010]

15 years agoImprove type constraint checking in semantic_sub(), i.e. binary -.
Christoph Mallon [Wed, 6 Aug 2008 10:35:29 +0000 (10:35 +0000)]
Improve type constraint checking in semantic_sub(), i.e. binary -.

[r21009]

15 years agoAlways set the result type of pointer - pointer to type_ptrdiff_t disregarding whethe...
Christoph Mallon [Wed, 6 Aug 2008 09:13:05 +0000 (09:13 +0000)]
Always set the result type of pointer - pointer to type_ptrdiff_t disregarding whether the unqualified pointer types are compatible.

[r21008]

15 years agoCorrect references to the C99 standard.
Christoph Mallon [Wed, 6 Aug 2008 07:11:06 +0000 (07:11 +0000)]
Correct references to the C99 standard.

[r21006]

15 years agoAdd #include <stdbool.h>.
Christoph Mallon [Tue, 5 Aug 2008 21:12:22 +0000 (21:12 +0000)]
Add #include <stdbool.h>.

[r21005]

15 years agonew cp_error040: Input of asm node becomes a NULL pointer
Moritz Kroll [Tue, 5 Aug 2008 12:59:43 +0000 (12:59 +0000)]
new cp_error040: Input of asm node becomes a NULL pointer

[r20991]

15 years agoFix cp_error041.c.
Christoph Mallon [Tue, 5 Aug 2008 07:51:54 +0000 (07:51 +0000)]
Fix cp_error041.c.

[r20985]

15 years agofix shouldfail/paramerror.c: Do not crash when a parameter name is omitted, but gener...
Christoph Mallon [Tue, 5 Aug 2008 07:45:51 +0000 (07:45 +0000)]
fix shouldfail/paramerror.c: Do not crash when a parameter name is omitted, but generate an error.

[r20984]

15 years agoSimplify testcase.
Christoph Mallon [Tue, 5 Aug 2008 07:33:49 +0000 (07:33 +0000)]
Simplify testcase.

[r20983]

15 years agoRemove cp_error040.c: The error message is correct, though not necessary (gcc 4.2...
Christoph Mallon [Tue, 5 Aug 2008 07:15:02 +0000 (07:15 +0000)]
Remove cp_error040.c: The error message is correct, though not necessary (gcc 4.2.3 does not compile Quakeforge 0.5.5 either).  §6.2.2 clause 7: "If, within a translation unit, the same identifier appears with both internal and external linkage, the behavior is undefined.".

[r20982]

15 years agocp_error041: Pointer arithmetic with pointer to an enum bitfield
Moritz Kroll [Tue, 5 Aug 2008 02:21:15 +0000 (02:21 +0000)]
cp_error041: Pointer arithmetic with pointer to an enum bitfield

[r20981]

15 years agoFixed '-Wl,<option>' support (only works when gcc is used as linker)
Moritz Kroll [Tue, 5 Aug 2008 01:15:14 +0000 (01:15 +0000)]
Fixed '-Wl,<option>' support (only works when gcc is used as linker)

[r20978]

15 years agoWrong 'static decl after non-static decl' error
Moritz Kroll [Tue, 5 Aug 2008 01:12:15 +0000 (01:12 +0000)]
Wrong 'static decl after non-static decl' error

[r20977]

15 years agoFixed regression of .S support
Moritz Kroll [Tue, 5 Aug 2008 00:37:58 +0000 (00:37 +0000)]
Fixed regression of .S support

[r20976]

15 years agoFixed visibility of inline functions
Moritz Kroll [Tue, 5 Aug 2008 00:32:07 +0000 (00:32 +0000)]
Fixed visibility of inline functions

[r20974]

15 years agoparamerror: crashing shouldfail with missing parameter name
Moritz Kroll [Mon, 4 Aug 2008 23:48:12 +0000 (23:48 +0000)]
paramerror: crashing shouldfail with missing parameter name

[r20973]

15 years agoAdded support for .a and .so files. Added gcc-style linker options (-Wl,<option>)
Moritz Kroll [Mon, 4 Aug 2008 21:22:44 +0000 (21:22 +0000)]
Added support for .a and .so files. Added gcc-style linker options (-Wl,<option>)

[r20972]

15 years agofix result in error case
Matthias Braun [Mon, 4 Aug 2008 12:35:51 +0000 (12:35 +0000)]
fix result in error case

[r20968]

15 years agoadd support for -x
Matthias Braun [Mon, 4 Aug 2008 12:11:30 +0000 (12:11 +0000)]
add support for -x

[r20967]

15 years agonew exprimental phase handling
Matthias Braun [Mon, 4 Aug 2008 11:50:01 +0000 (11:50 +0000)]
new exprimental phase handling

[r20965]

15 years agotypo fix
Matthias Braun [Mon, 4 Aug 2008 11:42:04 +0000 (11:42 +0000)]
typo fix

[r20963]

15 years agorework commandline handling
Matthias Braun [Mon, 4 Aug 2008 11:41:51 +0000 (11:41 +0000)]
rework commandline handling

[r20962]