1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-27 04:54:54 +00:00
cc65 - a freeware C compiler for 6502 based systems
Go to file
Jesse Rosenstock 90d1c89bff
Allow overlap of bit-field storage units (#1055)
* Allow overlap of bit-field storage units

Previously,
struct s {
    unsigned int x : 10;
    unsigned int y : 10;
};
had sizeof(struct s) == 4.

With this change, allow the storage units of x and y to overlap,
so sizeof(struct s) == 3, with y stored immediately after x,
with no padding between them.

An int bit-field (the only type currently supported) will still
never occupy more than two bytes.

* ParseStructInit: Fix typo and expand comment

Explain why there are at most 30, not 32 bits.

* ParseStructDecl: Rewrite AddBitFieldCall

No behavior change.

Co-authored-by: Jesse Rosenstock <jmr@users.noreply.github.com>
2020-06-27 15:02:11 +02:00
asminc Added waitvsync() for the Enhanced Apple //e. 2020-06-18 21:44:57 +02:00
cfg Updated the cx16 library to the Commander X16 Kernal's prerelease 35. 2019-12-25 10:56:32 -05:00
doc fix description of Kerberos memory 2020-06-22 23:55:45 +02:00
include change order of declarations. 2020-06-22 23:55:45 +02:00
libsrc
samples
src Allow overlap of bit-field storage units (#1055) 2020-06-27 15:02:11 +02:00
test Add test license description. 2020-06-27 02:23:40 +02:00
testcode
util
.gitattributes
.gitignore
.travis.yml
LICENSE
Makefile
Makefile.travis The doc now lives in the 'master' branch of the 'doc' project. 2018-09-18 23:39:11 +02:00
README.md

Windows Snapshot

Documentation

Wiki

Build Status

cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools.

cc65 has C and runtime library support for many of the old 6502 machines, including

  • the following Commodore machines:
    • VIC20
    • C16/C116 and Plus/4
    • C64
    • C128
    • CBM 510 (aka P500)
    • the 600/700 family
    • newer PET machines (not 2001).
  • the Apple ][+ and successors.
  • the Atari 8-bit machines.
  • the Atari 2600 console.
  • the Atari 5200 console.
  • GEOS for the C64, C128 and Apple //e.
  • the Bit Corporation Gamate console.
  • the NEC PC-Engine (aka TurboGrafx-16) console.
  • the Nintendo Entertainment System (NES) console.
  • the Watara Supervision console.
  • the VTech Creativision console.
  • the Oric Atmos.
  • the Oric Telestrat.
  • the Lynx console.
  • the Ohio Scientific Challenger 1P.

The libraries are fairly portable, so creating a version for other 6502s shouldn't be too much work.