1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-01 23:29:41 +00:00
Commit Graph

67 Commits

Author SHA1 Message Date
acqn
befc9533c6 More accurate diagnostic messages on empty declarations without any type specifiers. 2023-12-10 20:21:50 +08:00
mrdudz
6b855d562a use -std=gnu17 for the references, so the test bench will not break with GCC 14. see #2277 2023-12-10 23:18:55 +01:00
acqn
79b4690077 Fixed missing diagnostics on empty enum/struct/union declareations without tag names.
Improved error recovery with local declarations and _Static_assert.
2023-12-10 15:43:24 +08:00
Bob Andrews
5537b61e6a
Merge pull request #2272 from acqn/Diagnostics
[cc65] Improved diagnostics
2023-11-28 15:06:39 +01:00
acqn
b99ebc1256 Fixed diagnostic messages about undeclared identifiers. 2023-11-27 20:39:15 +08:00
acqn
7574e36e95 Improved error recovery with function declarations.
Fixed some rare cases when a single file-scope error could get reapeated endlessly until the maximum total count of errors allowed is reached.
2023-11-27 20:39:15 +08:00
acqn
3af77e7333 Improved error recovery in declarations with curly braces. 2022-11-12 12:28:29 +08:00
Bob Andrews
ace39197e5 move test to test/ref 2022-11-11 21:22:20 +01:00
Bob Andrews
ebb33ee8b4 fix problem with copy command in cmd.exe 2022-11-11 20:54:38 +01:00
mrdudz
44b2e4f331 added examples for tests that compare the compiler output with a reference 2022-11-03 17:40:13 +01:00
acqn
03ceeb4ad1 Removed warning on implicit "return 0" in C99 standard main function in default cc65 mode. 2022-10-22 12:45:51 +08:00
mrdudz
0129622383 remove dangling spaces 2022-04-17 16:07:52 +02:00
mrdudz
8cacfa70d5 add missing newline to a bunch of files 2022-04-16 19:51:48 +02:00
Greg King
b0497f40b2 'test/isequal.c' doesn't change. Don't rebuild it for each test subdirectory. 2020-11-17 13:40:36 -05:00
Jesse Rosenstock
44b719d957 Change line endings from CRLF to LF
test/ref/pr1220.c was somehow added with CRLFs.
Other files use just LF.
2020-09-04 14:01:21 +02:00
acqn
2a3d996077 Improved test case for PR #1220. 2020-09-02 21:36:59 +02:00
acqn
492ee7fc45 Improved test/ref/pr1220.c. 2020-08-30 03:10:24 +08:00
acqn
504aee3835
Merge branch 'master' into StaticConst 2020-08-27 06:27:23 +08:00
Oliver Schmidt
c658acbf85 Avoid cl65 in tests.
cl65 creates intermediate files based on the source file name in the source file directory. Calling cl65 in parallel with the same source file causes those intermediate files to get overwritten.

Fixes #1080
2020-08-26 20:39:34 +02:00
acqn
b6a4715a38 Added test/ref/pr1220 for testing constant AND/OR code generation. 2020-08-26 08:45:01 +08:00
mrdudz
1a92368aed rename bdiff.c to isequal.c, make it handle different line-endings as equal 2020-08-19 14:50:12 +02:00
mrdudz
df900e30b8 removed references to macros from common.h 2020-07-21 23:50:23 +02:00
Oliver Schmidt
bcb8b49907 Removed executable bit. 2020-07-12 23:11:43 +02:00
Jesse Rosenstock
8891a896b5 test/ref: Use separate .out files
Use different .out files for different options / targets.
This allows make -j N to work.

Previously all test.*.*.prgs would use the same test.out file.
Now test.*.*.out is also used.
2020-06-29 22:34:44 +02:00
Jesse Rosenstock
18246278c5 switch2.c: Remove use of REFCC and UNSIGNED_CHARS
Explicitly use `signed char` or `unsigned char`, rather than
```

signed char k;
char k;

signed char k;
char k;
```
This should have resulted in the same thing; however, note that
`REFCC` was never defined, and `common.h` was not included, so
the old code in fact tested `char` then `unsigned char`,
which are the same.

The only difference is that a switch using plain `char` is not
tested, but since this is the same as either `signed char` or
`unsigned char`, the lack of test coverage seems relatively safe.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
8fe317e7fa Remove REFCC_UNSIGNED_CHARS from test/ref/
Explicitly use signed char or unsigned char for REFCC.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
86ba877a99 Define REFCC and REFCC_UNSIGNED_CHARS in reference
switch2.c uses these macros.  With them unset, signed chars
are not tested.
2020-06-25 13:18:08 +02:00
acqn
e9307ce58e Moved test/ref/cc65141011.c to test/val/cc65141011.c. 2020-06-22 23:23:39 +02:00
acqn
b2268765bf The ref test cc65141011.c now passes. 2020-06-22 23:23:39 +02:00
mc78
7bae9038cf Replaced plain 0's and 1's in exit statements with EXIT_SUCCESS or EXIT_FAILURE 2019-11-19 14:08:00 +01:00
Stefan
659d1729eb Fixed exit code #974 2019-11-12 08:05:25 -05:00
Greg King
a0db846a97 Allowed old-style (K and R) function declarations to be fastcall.
That lets them match old-style definitions.  It avoids "Type conflict" error messages.  It allows shorter function calls.

Fixed the types of some variables in "test/ref/otccex.c".  It avoids crashes on 64-bit Windows (32-bit Windows with 64-bit pointers).
2019-07-22 09:26:23 -04:00
Björn Esser
9faca05e6a test/ref/otccex: Fix ramdomly occurring segfault.
The variables named tab and p are used in the context of pointers
and thus must be declared as such.  Determining the purpose they
serve, using char over int seems more feasible here as well.
2019-06-09 20:26:12 +02:00
Christian Groessler
7445550831 remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
Greg King
a6b04f6e97 Changed most "backticks" (grave accents) into apostrophes.
Quotations that are embraced by tick marks now look better, in most fonts.
2019-01-05 14:57:12 -05:00
laubzega
4b78d40e97 Added testcase for between-blocks gotos.
Deleted old testcase.
2018-10-02 18:49:53 +02:00
greg-king5
e24bb372d0 Added a missing -O configuration. 2017-06-07 10:26:34 -04:00
Oliver Schmidt
0851e3d694 Allow to control test Makefile output via QUIET (like libsrc). 2017-03-20 11:22:04 +01:00
Oliver Schmidt
4a6bca0b56 Run test for the 65C02 code generator / runtime too.
Now that sim65's 65C02 support is actually functional we can run test for the 65C02 support in the compiler and the runtime.

We learn the hard way this is a good idea as there are tests failing when built with optimizations for the 65C02:
- val/compare7
- val/compare8
- val/compare9
- val/compare10
- val/or1
2017-03-19 20:07:19 +01:00
Oliver Schmidt
66634ef683 Cleaned up test Makefiles. 2017-03-19 17:48:44 +01:00
Greg King
73261ea48f Fixed a pointer test again -- but, it's better than in pull request #391.
This time, the expression compares the pointer directly, instead of comparing the pointer's target.  The new expression avoids an array underrun.
2017-03-11 15:11:15 -05:00
Christian Groessler
8a81f9c0c8 Fix line endings (CRLF -> LF) on all affected files. 2017-03-10 11:21:14 +01:00
Greg King
8f0ea644dd Fixed a pointer-difference, comparison-with-zero expression.
Some GCC C compilers can't subtract higher pointers from lower pointers properly, when those pointers must be scaled (because they point to objects that are wider than a char). The scaling is done as unsigned which makes the difference positive instead of negative.

So, a broken expression was changed into a direct comparison between the two pointers.
2017-03-01 06:52:43 -05:00
Greg King
99f3c7d01d Fixed a makefile: "yaccdbg.c" includes "yacc.c". So, yaccdbg must depend on both of them. 2017-03-01 06:29:53 -05:00
Oliver Schmidt
50b0536222 Ignore return values only with CMD.EXE MkII.
CMD.EXE considers file deletion commands not able to delete anything as there's nothing to delete as failed. Of course we don't want to bail out of the Makefile because of missing files to delete. Therefore we ignore the return values with '-'. This change limits this workaround to CMD.EXE.
2015-07-11 00:01:39 +02:00
Oliver Schmidt
992f0f03c5 Ignore return values only with CMD.EXE.
CMD.EXE considers file deletion commands not able to delete anything as there's nothing to delete as failed. Of course we don't want to bail out of the Makefile because of missing files to delete. Therefore we ignore the return values with '-'. This change limits this workaround to CMD.EXE.
2015-07-10 22:39:53 +02:00
mrdudz
18b2de1624 remove comment 2015-06-29 11:18:24 +02:00
mrdudz
5b1917d23f remove workaround for optimizer bug 2015-06-29 02:34:12 +02:00
Oliver Schmidt
5a7ba692f5 Avoid "*** Recursive variable `RM' references itself (eventually)." 2015-06-27 00:33:24 +02:00
Oliver Schmidt
9bd11f161f Made test Makefiles work with CMD.EXE 2015-06-27 00:03:45 +02:00