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
mrdudz
844f5a9d33
hook up test/todo in the toplevel test makefile
2020-07-22 15:12:29 +02:00
mrdudz
6abf24e25e
move test for issue #1077 to test/val
2020-07-22 15:12:02 +02:00
mrdudz
e22e9c403c
added testcase for issue #1098
2020-07-22 14:57:40 +02:00
Greg King
44c82eb1c3
Made da65 disassemble branch instructions with relative address expression operands if there's no label.
2020-07-21 18:43:32 -04:00
mrdudz
eb094ecf6a
remove ifdef magic
2020-07-22 00:21:23 +02:00
mrdudz
4a9c5ff63b
use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day
2020-07-22 00:09:48 +02:00
mrdudz
6d518a61a5
Merge branch 'master' of https://github.com/cc65/cc65
2020-07-21 23:52:24 +02:00
mrdudz
df900e30b8
removed references to macros from common.h
2020-07-21 23:50:23 +02:00
Oliver Schmidt
77674352f6
Minor style change.
2020-07-21 23:44:36 +02:00
Brad Smith
041f981960
rand() use XOR to break up unwanted pair correlation ( #1107 )
...
* rand() use XOR to break up unwanted pair correlation
This form of rand() cannot return the same value twice in a row.
Two additonal EOR instructions produce a more even distribution of successive pairs.
see comments on #951
* rand.s document purpose of XOR
* suggested srand() optimization: zero fill unnecessary
* test to validate implementation of rand()
* srand() improving behaviour and adding startup test
* srand() with a tail call to rand() for better initial shuffle
* srand() can fall through to rand() instead of tail call
2020-07-21 23:38:18 +02:00
mrdudz
7e1f4760e7
remove common.h from test/misc, its no more used
2020-07-21 23:31:58 +02:00
mrdudz
2bbea6779a
properly configure sitest so it could work, if we had the respective features :)
2020-07-21 23:04:03 +02:00
mrdudz
9e43c0a569
added a test related to pr#1102 - we can now return structs by value when they are max. 4 bytes
2020-07-21 21:04:41 +02:00
mrdudz
145084c41c
move test for issue #1075 to test/var
2020-07-21 20:02:51 +02:00
mrdudz
42c162c15e
rework test for issue #1075 to return an exit code
2020-07-21 19:58:36 +02:00
mrdudz
a0c80a8c72
move (now working) tests to test/val
2020-07-21 19:24:39 +02:00
mrdudz
b2d7998241
update makefile to use $(NOT) as discussed with Oliver
2020-07-21 19:15:41 +02:00
acqn
07e18774f7
Added spaces around '|' with regex replacement.
2020-07-21 18:23:52 +02:00
acqn
c66d0881b9
Made the enum/enumerator types clearer and improved DumpSymEntry() output.
2020-07-21 18:23:52 +02:00
acqn
18bd76bb90
Minor fixes and improvements.
2020-07-21 18:23:52 +02:00
acqn
65081aebed
Made able to recognize global declarations of static arrays. Fixed Issue #975 .
2020-07-21 18:23:52 +02:00
acqn
0250c87ac6
Fixed SC_* type masks by making them all bitwise-exclusive.
2020-07-21 18:23:52 +02:00
mrdudz
e4fc7a0fec
reworked pptest3 into an exectutable test and moved to test/val
2020-07-21 15:30:35 +02:00
mrdudz
010ed6d729
reworked pptest1/4/5 into executable tests and moved to test/val
2020-07-21 14:58:15 +02:00
mrdudz
638e254668
rework pptest2 into a runable test and move to test/misc (since it does not compile with cc65)
2020-07-21 14:48:49 +02:00
Greg King
b60b303c5d
Added a missing asterisk to a "hardware" struct definition.
2020-07-20 21:40:44 -04:00