1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
Commit Graph

3194 Commits

Author SHA1 Message Date
acqn
57117fa687 Utility functions about compare conditions. 2020-09-08 14:19:48 +02:00
acqn
64ef562fa7 Moved all optimization steps from codeopt.c and some optimization steps from coptind.c into new separate files. 2020-09-08 14:18:22 +02:00
Jesse Rosenstock
9a0e4a35e1 Fix enum bit-field ICE #1244
This previously resulted in an ICE:
cc65: Check failed: (Entry->Type->C & T_MASK_SIGN) == T_SIGN_SIGNED,
file 'cc65/symtab.c', line 874

This CHECK is in the code that deals with changing `int` bitfields to
`unsigned int`.

Work around this by treating enum bit-fields as having their signedness
specified, so this type change code does not get called.

Fixes #1244.
2020-09-07 11:21:23 +02:00
Tevo
1e7a9e44af Update comment to reflect addition of integer boundary constants 2020-09-06 23:32:00 +02:00
Tevo
23a8b2c303 Define integer size macros for lacking systems
Define integer size macros for lacking systems
2020-09-06 23:32:00 +02:00
acqn
6bb2d1d5d1 Fixed a comment on struct/union types in DoCompare(). 2020-09-06 22:47:11 +02:00
acqn
1cde952cf5 Fixed comparing an enum type with a non-enum type in DoCompare(). 2020-09-06 22:47:11 +02:00
acqn
6e0fb630d7 Fixed check for processor flags usage in case of PHP. 2020-09-06 13:32:38 +02:00
acqn
e2f950b15e Avoided referencing string literals with sizeof so that they are not output if unused elsewhere. 2020-09-05 13:21:21 +02:00
acqn
903e84c24c Std-functions are no longer inlined if they are unevaluated. 2020-09-05 13:21:21 +02:00
acqn
df07e23f2c Fixed bnegeax funcinfo on register usage. 2020-09-05 02:25:56 -04:00
acqn
f849de6769 Object addresses as non-NULL for comparison with NULL. 2020-09-04 19:50:32 +02:00
acqn
8e0b2f0833 Object addresses as non-NULL in boolean context. 2020-09-04 19:50:32 +02:00
acqn
bc5570b708 Fixed logical-NOT in constant context. 2020-09-04 19:50:32 +02:00
acqn
676b14429d Better opt chance for certain optimization steps e.g. OptPtrStore1 etc. 2020-09-04 12:00:10 +02:00
acqn
29d1999947 Rearranged the OptFunc's in alphabetic order. 2020-09-04 12:00:10 +02:00
acqn
761d00b7dc Ignore running removed old optimization steps. Neither list them in help info. 2020-09-04 12:00:10 +02:00
acqn
ae340703f2 OptDupLoads shouldn't silently do optimizations. 2020-09-04 11:58:25 +02:00
acqn
f45d2515eb Fixed OptPush1 in case later code would rely on that pushax zeroes register Y. 2020-09-04 11:58:25 +02:00
acqn
fb6bc275bc Fixed evaluation flags propagation to subexpressions in assignments and function calls. 2020-09-02 21:36:59 +02:00
acqn
2379504449 Fixed AND/OR in certain cases where the 'E_NEED_TEST' flag set for usage only in subexpressions should be cleared. 2020-09-02 21:36:59 +02:00
acqn
28de3423eb Merged some switch cases in code generation subroutines. 2020-08-31 09:12:03 +02:00
acqn
6b64b43395 Made local static data use a separated label pool from the code label pool. 2020-08-31 09:12:03 +02:00
acqn
9398e1cd33 Use a dedicated label pool for literals. 2020-08-31 09:12:03 +02:00
Oliver Schmidt
bee559d5f4
Merge pull request #1220 from acqn/StaticConst
[cc65] Fixed constant boolean expressions
2020-08-31 08:59:25 +02:00
acqn
74def4608a The 'E_NEED_TEST' flag shouldn't be overwritten when loading the expression result. 2020-08-31 02:30:12 +08:00
acqn
c0a873e0c8 Reduced exess errors on wrong initializations with curly braces. 2020-08-30 17:35:48 +02:00
acqn
8b580e1191 Disabled struct/union fields of 'void' type. 2020-08-30 17:33:36 +02:00
acqn
f1161daee9 Recursively checking for incomplete/unknown-sized types. 2020-08-30 17:33:36 +02:00
acqn
8541f18340 Improved diagnostic info on assignment to void types. 2020-08-30 17:33:36 +02:00
acqn
abcc2a8f1a Disallowed void arrays of elements of variant sizes. 2020-08-30 17:33:36 +02:00
acqn
d87846e1e1 Improved comments according to PR reviews. 2020-08-30 22:12:30 +08:00
acqn
60c59f59a3 Renamed StaticConstExpr() and StaticConstAbsIntExpr() with clearer comments. 2020-08-30 00:26:52 +08:00
acqn
df755df44d Warning about ESU types declared inside parameter list as they are invisble outside. 2020-08-29 16:37:16 +02:00
acqn
33a75e0a73 Optimized parameter list checking.
Fixed function type comparison between ANSI and K&R styles.
2020-08-29 16:37:16 +02:00
acqn
0a96ffc878 Fixed function parameter checking.
Fixed function return type checking.
2020-08-29 16:37:16 +02:00
acqn
4e61ae5b36 Fixed function parameter type conversion. 2020-08-29 16:37:16 +02:00
acqn
632da3f4ee Fixed tracking and checking flexible array members. 2020-08-29 16:35:42 +02:00
acqn
504aee3835
Merge branch 'master' into StaticConst 2020-08-27 06:27:23 +08:00
acqn
bb9c203222 Fixed integer promotion of unary operations. 2020-08-26 22:17:16 +02:00
acqn
8d225c32b1 Fixed checks on assignment to incomplete types. 2020-08-26 22:14:51 +02:00
acqn
43cb092a68 Fixed CHECK failures on certain usage of incomplete enums. 2020-08-26 22:14:51 +02:00
acqn
1957dc7a5c Disallowed arrays of incomplete types.
Fixed diagnostics on incomplete local arrays.
2020-08-26 22:14:51 +02:00
acqn
f5b1b69376 Forbid struct/union fields of incomplete types. 2020-08-26 22:14:51 +02:00
Jesse Rosenstock
d38e5858f0 Add tests for #1211
CL_MoveRefs: Add CHECK (E->JumpTo != NULL) to make failure clearer.
2020-08-24 18:10:22 +02:00
acqn
c3a6b39945 Made struct assignment less hackish. 2020-08-24 18:02:29 +02:00
acqn
d1995fc81a Fixed rvalue-ness of cast results. 2020-08-24 17:16:37 +02:00
acqn
911a79796d Fixed checks and diagnostics on type-casting. 2020-08-24 17:16:37 +02:00
acqn
0486d28abc Fixed Issue #327. 2020-08-22 13:44:18 +02:00
acqn
f289ea6c14 Avoided generating unnecessary true-case labels in logic AND/OR. 2020-08-22 11:10:17 +08:00