1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 20:29:34 +00:00
Commit Graph

1522 Commits

Author SHA1 Message Date
acqn
eeaa111835 Fixed crash in Opt_a_toscmpbool caused by wrong order of condition checks. 2021-09-28 17:02:37 +02:00
acqn
25a35d6b59 Fixed result type of certain operations, which was broken with the bit-field fix. 2021-06-10 21:54:32 +02:00
acqn
5adb29ce31 Made "bit-field-ness" a type property instead of a SymbolEntry or ExprDesc property.
Fixed integer promotion and result type in certain operations.
Fixed bit-fields 'op=' and postfix inc/dec operators.
2021-06-09 08:03:12 +02:00
acqn
1d7bf7355c Better function naming in declare.c.
Scalar initialization routines need only 'const Type*' as parameters.
2021-06-09 08:03:12 +02:00
acqn
004c60de39 Optional flags for the codegen to skip restoring the expression results into the primary registers. 2021-06-09 08:03:12 +02:00
acqn
dcacba472a Moved ArithmeticConvert() from cc65/expr.c to cc65/datatype.c.
Reorganized a few functions in cc65/datatype.c.
Added SignedType() and UnsignedType() for future usage.
Made LimitExprValue() external so that it can be used more often.
2021-06-09 08:03:12 +02:00
polluks2
ed9f9ccbab Fix #1536 2021-06-07 23:12:50 +02:00
acqn
4d5fe38540 Fixed OptStackOps when the stuff pushed on stack top is accessed before the op. 2021-06-03 12:03:53 +02:00
acqn
79be6dec16 More quick hack for CE_GenRegInfo. 2021-06-03 12:03:53 +02:00
acqn
0bfa13722b More funcinfo on register usage fixes. 2021-06-03 12:03:53 +02:00
Greg King
0d3c827d80 Made the C preprocessor #if nesting stack have 256 levels.
Closes #1523.
2021-05-30 03:52:32 -04:00
acqn
1450f146a5 Fixed '[]', '()' '.' and '->' operators following a postfix increment/decrement. 2021-05-16 20:43:49 +02:00
acqn
43ca887263 Fixed 'case'/'default' labels in non-compound 'switch' body statement. 2021-05-16 20:43:49 +02:00
acqn
18ae09f682 Less excessive errors with failed array declarations. 2021-05-14 10:48:17 +02:00
acqn
dfba8d77ca Error messages shouldn't raise warnings about unused expressions by themselves. 2021-05-14 10:48:17 +02:00
Greg King
e5813cfb1a Removed two duplicate TYPEDEFs from a header.
The first one is replaced by an #include of the header that has its original TYPEDEF.
The second one is replaced by its base type.

That change allows pedantic C90-compliant compilers to accept the header.
2021-05-13 00:24:32 -04:00
Greg King
af4c4f6aaf Removed a "return" keyword from an inline function that must return (void). 2021-05-12 19:43:32 -04:00
Andrea Odetti
bcc670ee36 Standard formatting of error messages.
https://www.gnu.org/prep/standards/html_node/Errors.html

Issue: https://github.com/cc65/cc65/issues/1494
2021-05-11 17:41:59 +02:00
Bob Andrews
82ee502f57
Merge branch 'master' into wrapped-call 2021-05-11 14:16:25 +02:00
mrdudz
07dd1e3849 fix formatting 2021-05-11 14:14:44 +02:00
mrdudz
18f94d1fe0 rework to use a magic value instead of a flag, as suggested by Oliver 2021-05-11 14:00:49 +02:00
mrdudz
ef74226993 improve error message 2021-05-11 13:37:53 +02:00
Oliver Schmidt
b7856ddd4f Just some source formatting adjustments. 2021-05-11 10:40:44 +02:00
mrdudz
0fbf2af09d Fix the warning that is produced for unused functions 2021-05-08 01:03:43 +02:00
mrdudz
c9f242e566 Extend #pragma wrapped-call to support "bank" argument 2021-05-05 14:42:29 +02:00
acqn
71bd6415d6 No more unnecessary jump-over labels generated for logical OR false cases. 2021-04-24 23:53:26 +02:00
Oliver Schmidt
5d84a4ba13 Removed non-ASCII chars. 2021-04-19 16:06:10 +02:00
Oliver Schmidt
f272bc8f42 Removed non-ASCII chars. 2021-04-19 15:50:52 +02:00
acqn
f901adba22 Predefined type strings for inlined std function parameters. 2021-04-19 15:36:55 +02:00
acqn
9cea9ce5e2 Made the code more constness-correct with 'Type' usage. 2021-04-19 15:36:55 +02:00
acqn
cb64aaf20c Made the code more constness-correct with 'Type' usage for inlined std functions. 2021-04-19 15:36:55 +02:00
acqn
328345b9c3 Removed a helper function that is no longer used. 2021-04-19 15:36:55 +02:00
acqn
24d36854d2 Minor cleanups with array element qualifiers. 2021-04-19 15:36:55 +02:00
acqn
896f463a23 Used more specific pointers instead of the "arbitary attribute pointer" used in type strings. 2021-04-19 15:36:55 +02:00
acqn
bfb7c936aa Preparation for constness-correction. 2021-04-19 15:36:55 +02:00
acqn
6e61093e79 Fixed pointer subtraction in certain very rare cases. 2021-04-17 11:14:37 +02:00
Dirk Lehmann
eb1cf750f2 -W-unreachable-code option added, alphabetic order of --list-warnings 2021-04-13 09:37:55 +02:00
acqn
e435da6234 Interim fix for Issue #897. 2021-04-06 22:20:39 +02:00
acqn
bd8eae67f1 Fixed local struct field access via the address of the struct. 2021-04-05 15:49:54 +02:00
acqn
1a3628df1a Fixed the term 'argument' vs 'parameter' in function parser. 2021-04-03 17:50:46 +02:00
acqn
2864b3ef8a Fixed composition of prototypes and old-style function definitions with default promotions.
Fixed function parameter list comparison with empty ones.
2021-04-03 17:50:46 +02:00
acqn
91fd30611a Fixed ICE on error cases such as '&func + int a'. 2021-04-03 17:45:52 +02:00
acqn
4a38965384 Warnings on discarding pointer qualifiers always.
Added new -W options to turn on/off warnings on certain pointer conversion cases:
- pointer-sign: to a pointer type differing in pointee signedness. Default on.
- pointer-types: to a pointer type incompatible. Default on.
2021-03-30 19:41:20 +02:00
acqn
b802efde54 Fixed ternary result type detection with pointer types.
Fixed pointer type comparison and conversion, especially regarding qualifiers.
Improved diagnostics about type comparison and conversion.
Reorganized some type-comparison/conversion functions.
2021-03-30 19:41:20 +02:00
acqn
cb8fbf4772 Removed the non-existing-in-C "struct/union scope" for structs/unions.
Fixed handling of struct/union field declarations without identifiers, which do nothing.
2021-03-29 19:28:22 +02:00
acqn
f273b1ebcb Fixed crash with non-inlined __fastcall__ function invocation with no arguments. 2021-03-26 11:02:46 +08:00
acqn
3755e4a863 Replaced checking for __fastcall__ aginst AutoCDecl etc. with IsFastcallFunc(). 2021-03-24 14:35:44 +08:00
acqn
3c2e7ce41c More reliable test for true/false with addresses for AND, OR and ternary operators.
Minor comment typo fix.
2021-03-20 01:39:32 +01:00
acqn
f8835d2867 Fixed codegen with addresses as boolean test conditions.
Fixed warning on unreachable code of if body.
2021-03-20 01:39:32 +01:00
acqn
325b7b4ab3 Enabled 'a ? b, c : d'. 2021-03-20 00:09:47 +01:00