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
acqn
a51d6d40de
Ternary fix for some obscure cases.
2021-03-20 00:09:47 +01:00
acqn
6974c1ff12
Fixed and cleaned up codegen logic with arithmetic conversion in addition and subtraction.
2021-03-19 16:35:03 +01:00
Christian Groessler
cd116e5ba0
src/ar65/library.c: style fix
2021-03-18 22:27:42 +01:00
Christian Groessler
9b05fe9982
src/ar65/library.c: fix compilation on Windows
2021-03-18 22:27:42 +01:00
Christian Groessler
358d750b3e
ar65: fix parallel builds by using a per-process temp file
2021-03-18 22:27:42 +01:00
Christian Groessler
64449f0f54
ar65: better version of last change
2021-03-18 22:27:42 +01:00
Christian Groessler
d3c495e8b9
ar65: fix parallel builds by using a per-process temp file
2021-03-18 22:27:42 +01:00
acqn
b02838439c
Changed g_addaddr_local() codegen to reduce code size.
2021-03-16 22:29:20 +01:00
acqn
8eeaaa3f36
Made certain types of comparison between addresses in constant expressions work.
2021-03-16 22:29:20 +01:00
acqn
99c7fe0ada
Reusing code from parseadd() for ArrayRef().
...
Now index[ptr] works in constant expressions.
Fixed codegen for cast type in constant expressions.
Calls on swapstk in 'i[ptr]' is avoided when possible.
2021-03-16 22:29:20 +01:00
acqn
f5972dfd08
Made int+pointer work in constant expressions.
...
Fixed codegen for cast type addition in constant expressions.
Calls on swapstk in 'i+ptr' is avoided when possible.
2021-03-16 22:29:20 +01:00
acqn
aa6fdf58b8
Addresses in constant subtraction expressions now work.
...
Fixed codegen for cast type subtraction in constant expressions.
2021-03-16 22:29:20 +01:00
acqn
c4a2620e29
Added an utility function to check for quasi-constant addresses (of stack variables).
2021-03-16 22:29:20 +01:00
acqn
0a8ca3041a
Changd all Find*Last*InOpenRange() to return the beginning of the open range.
...
Fixed FindArgLastUsageInOpenRange().
2021-03-16 22:24:19 +01:00
acqn
4376b83390
Fixed LoadAAt().
2021-03-16 22:24:19 +01:00
acqn
bd5d5b7385
Removed the prototype of evalexpr() that no longer exists.
2021-03-16 22:24:19 +01:00
acqn
047d0f479b
Comments format fix.
2021-03-03 10:07:24 +01:00
acqn
2aad72af90
Removed trailing whitespaces.
2021-03-03 10:07:24 +01:00
acqn
3caceb8174
Fixed result type in certain contant expression addition cases.
2021-02-26 19:45:46 +01:00
acqn
f2eed38fc8
Fixed expression type of the result of numeric constant comparison.
2021-02-26 19:45:46 +01:00
acqn
ea0c634e12
Improved codegen for unsigned char type comparison with numeric constants.
2021-02-23 22:06:21 +01:00
acqn
d628772cd1
Fixed signed char type comparison with unsigned numeric constants.
2021-02-23 22:06:21 +01:00
acqn
f1c715c455
Fixed a bug that pointer subtraction results from two absolute addresses are calculated as unsigned long.
2021-02-22 14:14:59 -05:00
acqn
81d6321cd7
Fixed internal representation of calculated constant results.
...
Minor clean-up.
2021-02-22 14:14:59 -05:00
acqn
eadaf2fef8
Fixed deferred post-inc and post-dec in unevaluated context such as 'sizeof(i++)'.
2021-02-22 11:02:47 +01:00
acqn
55ae350fed
Fixed 'Opt_staxspidx' for the invariant of 'staxspidx'.
2021-02-17 07:03:11 -05:00
acqn
bfc7a51a44
Fixed Issue #1265 according to C89/C99 standards.
2021-01-30 14:31:51 +01:00
acqn
c9ac515286
Functions with no prototypes might use EAX registers.
2021-01-30 14:31:51 +01:00
acqn
a1992702f8
Declarations of 'extern' object and function should be visible in the file scope.
2021-01-30 14:31:51 +01:00
acqn
b99455cc47
Fixed Issue #1374 .
2021-01-19 14:33:27 +01:00
Rocky
a9b71b6207
return-type - new warning suppression type added
2021-01-06 16:05:04 +01:00
Jesse Rosenstock
e0c12c90cd
g_asr, g_asl: Use ROL/ROR for char shifts by >= 6
...
Instead of `val` right (left) shifts, we can also do `9 - val` left (right)
rotates and a mask. This saves 3 bytes and 8 cycles for `val == 7` and
1 byte and 4 cycles for `val == 6`.
2020-12-27 14:22:40 -05:00
Christian Groessler
ef258bdc19
remove TABs which again slipped in....
2020-12-25 07:16:26 +01:00
Jesse Rosenstock
dfd047ce6a
g_typeadjust: Use CF_CHAR for char args
...
If lhs and rhs are either both signed char or both unsigned char,
return flags for that type instead of (unsigned) int. The flags
are used only for codegen. Currently, this does nothing, since
codegen treats chars as ints unless CF_FORCECHAR is set, but it
allows more efficient char x char -> int codegen to be added in
the future.
2020-12-24 14:40:39 -05:00
Greg King
b2c1a77bb3
Fixed the cc65 code that optimizes 16-bit compares when the high bytes are known to be equal.
...
Only the low bytes are compared. Originally, signed 16-bit compares were optimized into signed 8-bit compares. But, the sign bits are in the high bytes; and, they're equal. Therefore, the low bytes always must be compared as unsigned numbers.
Fixes #1348 .
2020-12-24 12:27:09 -05:00
Tim Gates
2646c06f61
docs: fix simple typo, paramater -> parameter
...
There is a small typo in src/cc65/pragma.c.
Should read `parameter` rather than `paramater`.
2020-11-29 10:26:08 +01:00
Greg King
8b42f570e9
Fixed code that caused a seg-fault after parsing a (deferred) post-count argument followed by a (nested) function-call argument.
...
The old broken code defers the count until the end of the (parent function's) argument list. But, a nested function call clears the pointer to the deferred type. That leads to an access violation.
The new code defers only until the end of each argument. Fixes #1320 .
2020-11-20 17:45:14 -05:00
Oliver Schmidt
cffcbce60f
Bumped version.
...
I placed the Git tag V2.19 in hindsight at 555282497c
. But I certainly don't want to rewrite the Git history just for the reported version, so I simply set the reported version at today's HEAD to 2.19.
2020-11-20 19:11:20 +01:00
Zsolt Branyiczky
63543dee07
Revert transient modification of EATab Table 0 comment
2020-11-19 22:02:07 +01:00