1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-13 03:29:36 +00:00
Commit Graph

29 Commits

Author SHA1 Message Date
acqn
3d0dc58153 Fixed visibility of undeclared functions and objects. 2024-01-13 00:46:14 +08:00
acqn
38dac907e8 Cleanup for symbol types and flags. 2024-01-10 04:51:59 +08:00
acqn
546be1d5dd Fixed assertion failure when there is an undefined symbol used in a parameter list. 2023-11-27 20:42:50 +08:00
acqn
a2dfa7c721 More consistent names for SymEntry functions. 2022-10-12 13:10:17 +08:00
acqn
6beb090193 Fixed anonymous bit-fields declared with typedef'ed type names. 2022-01-03 23:54:14 +08: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
df755df44d Warning about ESU types declared inside parameter list as they are invisble outside. 2020-08-29 16:37:16 +02:00
Jesse Rosenstock
ff535b8e1a Treat signed int bit-fields as signed
Prior to this PR, `int`, `signed int`, and `unsigned int`
bitfields are all treated as `unsigned int`.

With this PR, `signed int` will be treated as `signed int`,
and the others remain unsigned.

Since `Type` does not distinguish between `int` and `signed int`,
add an extra `int* SignenessSpecified` param to `ParseTypeSpec`
so we can tell these apart for bit-fields and treat plain `int : N`
as `unsigned int : N` since it is more efficient to zero-extend
than sign-extend.

Fixes #1095
2020-08-18 12:23:20 +02:00
acqn
8a417ff039 Improved ESU declaration failure handling. 2020-08-14 18:15:31 +02:00
acqn
25d10d9d9a Fixed nested struct/union initialization.
Fixed bit-fields offsets in anonymous structs.
2020-07-30 08:38:24 +02:00
acqn
daa65199b3 Fixed underlying types of enums.
Made enumerator diagnostics more sensible.
Fixed Issue #1048 as a natural result.
2020-07-28 23:26:25 +02:00
acqn
768e03a474 Small fixes and tidy-up based on PR review.
Renamed GetReplacementType() to GetStructReplacementType().
Clarified in comments that most *Struct* facilities work for unions as well.
Made it clear in some error messages with regards to structs/unions.
2020-07-19 10:58:33 +02:00
Jesse Rosenstock
1c2edc5434 AddBitField: Rename Width arg to BitWidth
This makes the arg consistent with the SymEntry field name.
2020-06-21 01:08:44 +02:00
Lauri Kasanen
37f00e6644 Export the label symbol table 2019-04-21 12:46:03 -04:00
laubzega
d3665b263e Stack adjustment code optimizations. 2018-10-16 09:55:02 +02:00
Oliver Schmidt
4185caf855 Normalized code. 2014-03-04 01:11:19 +01:00
Oliver Schmidt
85885001b1 Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
uz
fd679d92d0 Fixed a problem: When a struct or unit was declared with a tag name, it was
possible to use the opposite type with the tag name. That is "struct a" after
declaring "union a" and vice versa.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5980 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-02-02 22:31:26 +00:00
uz
8fc851b338 Write out global symbols to the debug file. Added some fixes for unusual
situations (extern symbols without attached import, because the import wasn't
referenced and therefore removed by the assembler).


git-svn-id: svn://svn.cc65.org/cc65/trunk@5290 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-31 20:48:40 +00:00
uz
bd872a6324 Added code to parse bit fields and enter them into the symbol table. They're
not supported in code generation until now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4072 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 17:38:53 +00:00
cuz
de3a20a898 Changed the low level type representation from a strung of unsigned short
elements to a string of structs, each representing one type element. This
should fix problems on unusual architectures, since it is no longer necessary
to embedd pointers and other data converted to numbers in the string of
unsigned shorts.
Increased the TypeCode length to unsigned long to make room for more type
bits.
Inline more functions in datatype.h.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3709 b7a2c559-68d2-44c3-8de9-860c34a00d81
2006-02-19 12:29:37 +00:00
cuz
70755921a9 Re-added register variables.
Changed/added several optimizer steps to detect register variables correctly
or to handle them in a special way.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1636 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-25 15:05:15 +00:00
cuz
12ec031f9a Polishing and minor corrections
git-svn-id: svn://svn.cc65.org/cc65/trunk@741 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-22 13:58:56 +00:00
cuz
8eadb8aee0 Working on the new backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@706 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-03 17:34:54 +00:00
cuz
59bcc726b6 Make AddConstSym from AddEnumSym
git-svn-id: svn://svn.cc65.org/cc65/trunk@660 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-23 21:27:48 +00:00
cuz
594a941ee9 Make __fixargs__ an actual symbol table entry. Add a new pseudo variable
__argsize__.


git-svn-id: svn://svn.cc65.org/cc65/trunk@646 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-23 10:16:50 +00:00
cuz
25f5c69efa Reworked type comparison and handling of type qualifiers
git-svn-id: svn://svn.cc65.org/cc65/trunk@285 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-14 22:18:26 +00:00
cuz
9cc25f13b6 Added support for old style (K&R) function declarations.
Several renames for better readibility.
Removed separate struct and enum symbol tables in favour of one tag table.
Check for some more error conditions or dubious constructs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@62 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-12 18:31:40 +00:00
uz
53dd513176 This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-05-28 13:40:48 +00:00