github c3lang/c3c v0.6.7
Version 0.6.7

latest releases: latest-prerelease-tag, v0.8.1, v0.8.0_3...
15 months ago

C3 version 0.6.7

Changes / improvements

  • Contracts @require/@Ensure are no longer treated as conditionals, but must be explicitly bool.
  • Add win-debug setting to be able to pick dwarf for output #1855.
  • Error on switch case fallthough if there is more than one newline #1849.
  • Added flags to c3c project view to filter displayed properties
  • Compile time array assignment #1806.
  • Allow +++ to work on all types of arrays.
  • Allow (int[*]) { 1, 2 } cast style initialization.
  • Experimental change from [*] to [?]
  • Warn on if-catch with just a default case.
  • Compile time array inc/dec.
  • Improve error message when using ',' in struct declarations. #1920
  • Compile time array assign ops, e.g. $c[1] += 3 #1890.
  • Add inline to enums #1819.
  • Cleaner error message when missing comma in struct initializer #1941.
  • Distinct inline void causes unexpected error if used in slice #1946.
  • Allow fn int test() => @pool() { return 1; } short function syntax usage #1906.
  • Test runner will also check for leaks.
  • Improve inference on ?? #1943.
  • Detect unaligned loads #1951.

Fixes

  • Fix issue requiring prefix on a generic interface declaration.
  • Fix bug in SHA1 for longer blocks #1854.
  • Fix lack of location for reporting lambdas with missing return statement #1857.
  • Compiler allows a generic module to be declared with different parameters #1856.
  • Fix issue with @const where the statement $foo = 1; was not considered constant.
  • Const strings and bytes were not properly converted to compile time bools.
  • Concatenating a const empty slice with another array caused a null pointer access.
  • Fix linux-crt and linux-crtbegin not getting recognized as a project paramater
  • Fix dues to crash when converting a const vector to another vector #1864.
  • Filter $exec output from \r, which otherwise would cause a compiler assert #1867.
  • Fixes to `"exec" use, including issue when compiling with MinGW.
  • Correctly check jump table size and be generous when compiling it #1877.
  • Fix bug where .min/.max would fail on a distinct int #1888.
  • Fix issue where compile time declarations in expression list would not be handled properly.
  • Issue where trailing body argument was allowed without type even though the definition specified it #1879.
  • Fix issues with @jump on empty default or only default #1893 #1894
  • Fixes miscompilation of nested @jump #1896.
  • Fixed STB_WEAK errors when using consts in macros in the stdlib #1871.
  • Missing error when placing a single statement for-body on a new row #1892.
  • Fix bug where in dead code, only the first statement would be turned into a nop.
  • Remove unused $inline argument to mem::copy.
  • Defer is broken when placed before a $foreach #1912.
  • Usage of @NoReturn macro is type-checked as if it returns #1913.
  • Bug when indexing into a constant array at compile time.
  • Fixing various issues around shifts, like z <<= { 1, 2 }.
  • return (any)&foo would not be reported as an escaping variable if foo was a pointer or slice.
  • Incorrect error message when providing too many associated values for enum #1934.
  • Allow function types to have a calling convention. #1938
  • Issue with defer copying when triggered by break or continue #1936.
  • Assert when using optional as init or inc part in a for loop #1942.
  • Fix bigint hex parsing #1945.
  • bigint::from_int(0) throws assertion #1944.
  • write of qoi would leak memory.
  • Issue when having an empty Path or just "."
  • set_env would leak memory.
  • Fix issue where aligned bitstructs did not store/load with the given alignment.
  • Fix issue in GrowableBitSet with sanitizers.
  • Fix issue in List with sanitizers.
  • Circumvent Aarch64 miscompilations of atomics.
  • Fixes to ByteBuffer allocation/free.
  • Fix issue where compiling both for asm and object file would corrupt the obj file output.
  • Fix poll and POLL_FOREVER.
  • Missing end padding when including a packed struct #1966.
  • Issue when scalar expanding a boolean from a conditional to a bool vector #1954.
  • Fix issue when parsing bitstructs, preventing them from implementing interfaces.
  • Regression String! a; char* b = a.ptr; would incorrectly be allowed.
  • Fix issue where target was ignored for projects.
  • Fix issue when dereferencing a constant string.
  • Fix problem where a line break in a literal was allowed.

Stdlib changes

  • Added '%h' and '%H' for printing out binary data in hexadecimal using the formatter.
  • Added weakly linked __powidf2
  • Added channels for threads.
  • New std::core::test module for unit testing machinery.
  • New unit test default runner.
  • Added weakly linked fmodf.
  • Add @select to perform the equivalent of a ? x : y at compile time.
  • HashMap is now Printable.
  • Add allocator::wrap to create an arena allocator on the stack from bytes.

Don't miss a new c3c release

NewReleases is sending notifications on new releases.