diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 15:55:33 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 15:55:33 +0200 |
| commit | fc41f7917531693680b5baf71ffe38c47333fe84 (patch) | |
| tree | a6e62232e05e7779034c5f9d1bf743b6f1c198e3 /test/114_cocsep_ttrep | |
| parent | fe534f1497da6447153064d7bba00243000f803b (diff) | |
| download | nissy-core-fc41f7917531693680b5baf71ffe38c47333fe84.tar.gz nissy-core-fc41f7917531693680b5baf71ffe38c47333fe84.zip | |
Make the project build with Microsoft's broken C compiler.
MSVC is not fully C11-compliant, even when compiling with /std:c11.
Some changes were needed to make the codebase compatible. Notably, the
notation a[static N] and a[n] for function parameters of array type is
not supported, so that had to be hidden behind a macro. Atomic types
are also an experimental feature, apparently, but at least they work
with the correct compiler flag.
One thing that MSVC does well, however, is warning on integer conversions
on /W4 level. I am not sure if Clang and GCC have something similar,
so I took this chance to fix some of these.
Diffstat (limited to 'test/114_cocsep_ttrep')
| -rw-r--r-- | test/114_cocsep_ttrep/cocsep_ttrep_tests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/114_cocsep_ttrep/cocsep_ttrep_tests.c b/test/114_cocsep_ttrep/cocsep_ttrep_tests.c index c5c1bb5..936dac3 100644 --- a/test/114_cocsep_ttrep/cocsep_ttrep_tests.c +++ b/test/114_cocsep_ttrep/cocsep_ttrep_tests.c | |||
| @@ -6,9 +6,9 @@ uint64_t coord_cocsep(cube_t); | |||
| 6 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); | 6 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); |
| 7 | 7 | ||
| 8 | void run(void) { | 8 | void run(void) { |
| 9 | uint8_t t; | 9 | uint8_t t, tt; |
| 10 | unsigned char buf[2000000]; | 10 | unsigned char buf[2000000]; |
| 11 | uint32_t *cocsepdata, tt; | 11 | uint32_t *cocsepdata; |
| 12 | uint64_t i, selfsim[COCSEP_CLASSES]; | 12 | uint64_t i, selfsim[COCSEP_CLASSES]; |
| 13 | uint64_t j, k, l; | 13 | uint64_t j, k, l; |
| 14 | cube_t rep[COCSEP_CLASSES], c, d; | 14 | cube_t rep[COCSEP_CLASSES], c, d; |
