acqn
4ccf10f3fa
Utility to get full type names.
2020-08-02 18:55:46 +02:00
acqn
0df45fe2f2
Utility for getting ESU tag type symbols.
2020-08-02 18:55:46 +02:00
Oliver Schmidt
c831f40e9b
Unfortunately there's no other way than using the absolute path to init the correct MSVC 2017 environment.
2020-08-02 18:44:13 +02:00
Oliver Schmidt
35d6a75b37
Fixed Windows path notation.
2020-08-02 17:49:18 +02:00
Oliver Schmidt
992596c981
Initialize MSVC 2017 environment before build.
2020-08-02 17:32:36 +02:00
Oliver Schmidt
ce19d7b84f
Made use of Travis CI's Windows support.
...
At least for now there seems to be no point in trying to build the libraries (and run the tests) on Windows. Rather we only want to check that the MSVC solution is still valid.
2020-08-02 15:50:31 +02:00
Jesse Rosenstock
adda28f5c5
LoadExpr: Set CF_FORCECHAR if test is required
...
If we are testing, we do not need to load the high byte(s).
2020-08-02 12:31:57 +02:00
acqn
2a555d198c
Changed 'switch' to 'if' according PR review comments.
2020-08-02 12:28:11 +02:00
acqn
30fd8592ae
Avoid internal errors when using function-type objects in expressions.
2020-08-02 12:28:11 +02:00
acqn
e526cbbff6
Fixed handling multiple storage specifiers in one declaration.
2020-08-02 02:20:25 +02:00
Jesse Rosenstock
633cd17a3e
Add enum size test case for #1050
2020-08-02 01:18:28 +02:00
Oliver Schmidt
e1043fac12
Adjusted to https://github.com/cc65/cc65/pull/1124 .
2020-08-01 10:56:05 +02:00
Jesse Rosenstock
9c70bd44a6
Clarify comment about large shift
...
This is to avoid overflow on host platform.
2020-07-31 19:33:28 +02:00
Jesse Rosenstock
847982c6bf
Handle bit-field test after shift/mask
...
Previously, bit-field tests were incorrectly combined with load in
`if (x.bitfield)`. Delay the test until after the shift/mask
is done. Still combine tests with load if no shift/mask is required.
Fixes #1139
2020-07-31 19:33:28 +02:00
Jesse Rosenstock
d0c7108dcf
Change copyright notice to "The cc65 Authors"
2020-07-30 19:17:11 +02:00
Jesse Rosenstock
3df6c383c0
Add support for static_assert
...
Add C11's _Static_assert and static_assert macro.
This is like #error, but is handled at a later stage
of translation, so it is possible to check sizes of
types, values of enums, etc.
https://en.cppreference.com/w/c/language/_Static_assert
https://port70.net/~nsz/c/c11/n1570.html#6.7.10
2020-07-30 19:17:11 +02:00
Jesse Rosenstock
c72fa735b9
Add test for #1139
2020-07-30 19:13:19 +02:00
Jesse Rosenstock
2d5fd0fc63
Use char ops if possible for bit-field loads
...
Set CF_FORCECHAR and change type to char once we have
shifted into a char.
This saves some unnecessary ldx #0 instructions.
2020-07-30 14:59:23 +02:00
acqn
e38f601fcc
Fixed padding at the ends of structs with bit-fields.
2020-07-30 08:38:24 +02:00
acqn
8a511bb63d
Fixed nested array initializers.
2020-07-30 08:38:24 +02:00
acqn
9075a853dc
Allows one trailing comma before the closing curly of a struct/union initializer.
2020-07-30 08:38:24 +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
d6d667a688
Improved error handling with symbol redefinitions.
2020-07-30 08:22:29 +02:00
acqn
92de4fa0d0
Enabled to recognize labels when parsing local variable declarations.
2020-07-30 08:22:29 +02:00
acqn
19c81ed866
Fixed type mask usage.
2020-07-30 08:13:23 +02:00
Jesse Rosenstock
fb9b50ff9c
Move type checks before bit-field width parsing
2020-07-30 08:10:38 +02:00
Jesse Rosenstock
aaa0cf5448
Add err tests for bitfield width errors
...
! ../../bin/cc65 -o ../../testwrk/err/bitfield-named-zero-width.s bitfield-named-zero-width.c
bitfield-named-zero-width.c(27): Error: Zero width for named bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-negative-width.s bitfield-negative-width.c
bitfield-negative-width.c(26): Error: Negative width in bit-field
! ../../bin/cc65 -o ../../testwrk/err/bitfield-too-wide.s bitfield-too-wide.c
bitfield-too-wide.c(26): Error: Width of bit-field exceeds its type
2020-07-30 08:10:38 +02:00
Jesse Rosenstock
a2561d07f3
Remove special-case bit-field width code
...
cbb33f8
restricted allowed bit-field types to int,
so this is equivalent for now, but forward-compatible.
Fixes FIXME
Also move the int type check before parsing the colon.
2020-07-30 08:10:38 +02:00
Jesse Rosenstock
74dda01919
Add test that plain int bitfields are unsigned
...
We want to make sure this doesn't change when #1095 is fixed;
unsigned is much more efficient.
2020-07-29 16:43:17 +02:00
Oliver Schmidt
8eab28012a
Adjusted project name.
2020-07-28 23:29:16 +02:00
acqn
cbb33f86e8
Disabled using non-int-size types to declare bit-fields.
2020-07-28 23:26:25 +02:00
acqn
c37f9f1a41
Check if the integer size is known in GetIntegerTypeMin/Max() to prevent potential misuse.
2020-07-28 23:26:25 +02:00
acqn
0f412b6beb
Small fixes according to PR review.
2020-07-28 23:26:25 +02:00
acqn
35e1efc7f2
Moved misc/bug1048 as it is already correctly rejected by the compiler.
2020-07-28 23:26:25 +02:00
acqn
7e243e0f2c
Allowed using all integer types including enum and char types to define bit-fields,
...
but kept the currently behavior that all of them are treated as unsigned int.
2020-07-28 23:26:25 +02:00
acqn
d8184fbe54
No longer insert all enums in the global symbol table.
2020-07-28 23:26:25 +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
Jesse Rosenstock
c272c73686
Add err test for char bit-fields #1047
2020-07-28 22:03:01 +02:00
Jesse Rosenstock
c0f2b69bef
Add test case for sign extending < 1 byte
2020-07-28 22:01:22 +02:00
Jesse Rosenstock
04d16b3740
Make $WORKDIR for tests/err
...
Without this, if there is a test that can compile,
it will still fail because the WORKDIR does not exist:
```
pass.c(1): Fatal: Cannot open output file '../../testwrk/err/pass.s': No such file or directory
```
2020-07-28 21:59:12 +02:00
Oliver Schmidt
cdd23edd37
Added building of samples.
2020-07-27 17:59:24 +02:00
Oliver Schmidt
4316242d7e
Adjusted to 5df2de0629
(and slightly simplified).
2020-07-27 17:47:14 +02:00
mrdudz
ed3f281b9e
fix wording
2020-07-27 14:40:27 +02:00
compyx
81d3dedb41
Move comment block as requested
2020-07-24 15:24:28 -04:00
compyx
294b5d1cf1
C64 soft80 conio: shave off a few bytes and cycles
2020-07-24 15:24:28 -04:00
Oliver Schmidt
5df2de0629
Added test target.
2020-07-22 23:27:04 +02:00
mrdudz
ffaae965d4
Merge branch 'master' of https://github.com/cc65/cc65
2020-07-22 15:56:23 +02:00
mrdudz
afe455238c
added test related to issue #1113
2020-07-22 15:55:55 +02:00
mrdudz
98b2d43c2b
added tests related to pr #1110
2020-07-22 15:52:04 +02:00
mrdudz
ce06b20c6c
add some details to the readme
2020-07-22 15:31:39 +02:00