github c3lang/c3c v0.8.4
Version 0.8.4

pre-release3 hours ago

Changes / improvements

  • Improved error message when providing an incorrect name for the panic function.
  • Add the ability to pinpoint a @require using the @require [a] a > 0 : "a must be greater than zero" syntax. #1804
  • benchmark and test project targets now work properly with c3c benchmark and c3c test.
  • Add $reflect(foo).param_struct and Foo::param_struct properties. #3099
  • Allow the parse faultset { ... }. For faultset, faultconst and excuse.
  • Improved error messages when underlined error is too long, or lines are too long. #3383
  • Add --implicit-float setting to control emission of floating point operations. #3449
  • Allow parameters to have @tag #3084
  • FooFn::params no longer returns ReflectedParam but a reflected reference. This allows get_tag/tags/has_tag.
  • Allow parameters to be queried for the default value using .default_value.
  • Allow ternary in alias definitions, e.g. alias foo = $feat(ABC) ? foo_1 : foo_2. #3464
  • On elf-x64, add noredzone to functions as a stopgap solution.
  • Add --stack-probe, --stack-probe-size and --stack-protector to configure stack probing and stack canary generation. #3437
  • Add stack-probe and stack-protector project options. #3437
  • Add @stackprobe(level), @nostackprobe, @stackprotector(level) and @nostackprotector attributes on functions and lambdas. #3437
  • Naked functions no longer have stack protectors by default.
  • Add @noredzone attribute.
  • Add dso_local attribute on ELF/COFF.
  • Let LLVM build the biggest modules first.
  • Support for iOS.
  • Allow - in c3c init some-project.
  • --keep-obj added, to prevent object files from being deleted after building/linking.
  • Slice equality for flat types is now lowered to memcmp, avoiding scalar loops. #3491
  • Add --warn-unusedlocal and --warn-unusedparam to detect unused parameters and locals. #3485
  • Improve the error message for build options which use =.
  • Add control registers to x86 inline assembly

Stdlib changes

  • CachedInStream and CachedOutStream added.
  • InStream.read now consistently returns 0 on EOF, and never throws io::EOF, and requires a non-zero buffer target.
  • pool::ThreadPool now only available using ThreadPoolOld unless -D OLD_THREADPOOL is used.
  • Add std::collections::Tree.
  • std::net added Socket.peer_address, peer_port, local_address, and local_port for retrieving remote and local socket address information. #3460
  • Add a range::slice macro.
  • Add log::get_logger.
  • RefCounted now correctly makes a difference between dealloc and free.
  • Path.is_link added.

Fixes

  • Vmem incorrectly handled reserve page sizes.
  • @return was accepted in doc comments for non-function/macro declarations.
  • Can not run targeted benchmark function in project #1651.
  • Detection of dead code would get reset after visiting a scope, causing a crash in codegen. #3453.
  • Switch was incorrectly copied inside of defer, causing crash in codegen. #3454
  • Codegen for debug info was incorrect for default init on arguments, causing crash with LLVM23.
  • Codegen for bitstruct b.foo-- was incorrect, causing crash with LLVM23.
  • @str_pascalcase/@str_camelcase treated digits as word separators and dropped them from the output. #3287
  • Typedef access resolution preferred inner type field over method. #3457
  • Generic gets instantiated despite being disabled with @feat #3459
  • Compiler hangs with generic alias in function. #3470
  • Resolution order for generics may cause generic function pointers to not get resolved before use. #3471
  • Stale tid in thread::current on POSIX. #3472
  • Compiler crashes on implicitly casting a &a - &b to another type. #3477
  • BigInt shift left would not work correctly with shifts over 32 bits.
  • DString copy would accidentally overwrite the allocator.
  • FixedBlockPool would not correctly handle changes to grow_capacity.
  • Fix bug in mem::equals calculating the last part to compare.
  • Miscompilation of struct initializers when a struct contained an array of vectors, causing incorrect alignment. #3483
  • String.escape would not correctly handle UTF16 pairs.
  • Heap buffer corruption when reversing vectors larger than 128 elements due to an undersized allocation.
  • $$mod on unsigned integers emitted signed division instead of unsigned remainder.
  • Improved codegen for casting an optional vector to an array.
  • Overload for ^1, e.g. foo[^1] = 2 did not work correctly. #3496
  • Correctly use defined C compiler in all cases. #3495

Don't miss a new c3c release

NewReleases is sending notifications on new releases.