Releases: c3lang/c3c
Releases Β· c3lang/c3c
latest-prerelease-20250816-0352
string: use correct allocator in `replace` (#2405) `replace` accepts an Allocator but uses `mem` instead.
Version 0.7.4
Changes / improvements
- Added const enums:
enum Foo : const
. Behaves like C enums but may be any type. - Casting to / from an enum is now possible again. No need to use
.ordinal
and.from_ordinal
. - Inline associated enum values are deprecated, use
--use-old-enums
to re-enable them. $typeof
may return a compile time type.- Improved error messages on missing qualifier on enum value. #2260
- Add
--echo-prefix
to edit the prefix with$echo
statements. Supports {FILE} and {LINE} - Catch accidental
foo == BAR;
wherefoo = BAR;
was most likely intended. #2274 - Improve error message when doing a rethrow in a function that doesn't return an optional.
- Add
--list-asm
to view all supportedasm
instructions. - Formatting option "%h" now supports pointers.
- Improve error on unsigned implicit conversion to signed.
- Update error message for struct initialization #2286
- Add SipHash family of keyed PRFs. #2287
$is_const
is deprecated in favour of@is_const
based on$defined
.- Multiline contract comments #2113
- Removed the use of temp allocator in backtrace printing.
env::AUTHORS
andenv::AUTHOR_EMAILS
added.- Suppress codegen of panic printing with when panic messages are set to "off".
- Implicit linking of libc math when libc math functions are used.
- Allow even smaller memory limits.
- Check unaligned array access.
- Add "@structlike" for typedefs.
- "poison" the current function early when a declaration can't be correctly resolved.
- Add komihash, a5hash, metrohash64, metrohash128, and wyhash2 variants with tests/benchmark. #2293
- '$assignable' is deprecated.
- Deprecate allocator::heap() and allocator::temp()
- Add
thread::fence
providing a thread fence. - Place output in
out
by default for projects. Use temp folder for building at the command line. - Allow absolute paths for
$embed
. - Add
@try
and@try_catch
. - Assignment evaluation order now right->left, following C++17 and possibly C23.
Fixes
- mkdir/rmdir would not work properly with substring paths on non-windows platforms.
- Hex string formatter check incorrectly rejected slices.
- Correctly reject interface methods
type
andptr
. - Comparing a null ZString with a non-null ZString would crash.
- Switch case with const non-int / enum would be treated as ints and crash. #2263
- Missing bounds check on upper bound with const ranges
foo[1:3]
. - Check up the hierarchy when considering if an interface cast is valid #2267.
- Fix issue with labelled break inside of a $switch.
- Non-const macros may not return untyped lists.
$for
ct-state not properly popped.- Inline
r / complex
for complex numbers fixed. - Const slice lengths were not always detected as constant.
- Const slice indexing was not bounds checked.
- Initialize pool correctly in print_backtrace.
--max-mem
now works correctly again.- Casting a fault to a pointer would trigger an assert.
- Make
to_float
more tolerant to spaces. - Fixes to thread local pointer handling.
- Fixes to JSON parsing and Object.
- Array indices are now using int64 internally.
- Bit shift operation fails with inline uint enum despite matching underlying type #2279.
- Fix to codegen when using a bitstruct constant defined using a cast with an operator #2248.
- Function pointers are now compile time constants.
- Splat 8 arguments can sometimes cause incorrect behaviour in the compiler. #2283
- Correctly poison the analysis after a failed $assert or $error. #2284
$foo
variables could be assigned non-compile time values.$foo[0] = ...
was incorrectly requiring that the assigned values were compile time constants.- "Inlined at" would sometimes show the current location.
- Fixed bug splatting constants into constants.
- Resize bug when resizing memory down in ArenaAllocator, DynamicArenaAllocator, BackedArenaAllocator.
- Error message for missing arg incorrect for methods with zero args #2296.
- Fix stringify of $vaexpr #2301.
- Segfault when failing to cast subexpression to 'isz' in pointer subtraction #2305.
- Fix unexpected display of macro definition when passing a poisoned expression #2305.
@links
on macros would not be added to calling functions.- Fix
Formatter.print
returning incorrect size. - A distinct type based on an array would yield .len == 0
- Overloading addition with a pointer would not work.
- Copying const enums and regular enums incorrect #2313.
- Regression: Chaining an optional together with contracts could in some cases lose the optional.
char[*] b = *(char[*]*)&a;
would crash the compiler ifa
was a slice. #2320- Implicitly cast const int expressions would sometimes not be detected as compile time const.
- Using @NoReturn in a short body macro would not work properly #2326.
- Bug when reporting error in a macro return would crash the compiler #2326.
- Short body return expression would not have the correct span.
- Fix issue where recursively creating a dir would be incorrectly marked as a failure the first time.
@format
did not work correctly with macros #2341.- Crash when parsing recursive type declaration #2345.
- Remove unnecessary "ret" in naked functions #2344.
- Lambdas now properly follow its attributes #2346.
- Not setting android-ndk resulted in a "set ndk-path" error.
- Lambda deduplication would be incorrect when generated at the global scope.
- Disallow accessing parameters in a naked function, as well as
return
, this fixes #1955. - Assigning string literal to char[<*>] stores pointer rather than characters. #2357
Stdlib changes
- Improve contract for readline. #2280
- Added Whirlpool hash.
- Added Ed25519.
- Added string::bformat.
- Virtual memory library.
- New virtual emory arena allocator.
- Added
WString.len
. - Added
@addr
macro. - Add
ConditionVariable.wait_until
andConditionVariable.wait_for
- Added readline_to_stream that takes a stream.
- Added
Ref
andRefCounted
experimental functionality. - Added
Volatile
generic type. - Added
UnalignedRef
generic type. - Add String conversion functions snake_case -> PascalCase and vice versa.
Version 0.7.3
Changes since 0.7.2
Changes / improvements
$typefrom
now also accepts a constant string, and so works like$evaltype
.$evaltype
is deprecated in favour of$typefrom
.- Literal rules have changed, this makes
-0xFF
now a signed integer. - Implicitly convert from constant typeid to Type in
$Type
assignment, and$assignable
. - Make $Type parameters accept constant typeid values.
- Deprecate
foo.#bar
. - Allow inference across
&&
#2172. - Added support for custom file extensions in project.json targets.
$eval
now also works with@foo
,#foo
,$Foo
and$foo
parameters #2114.@sprintf
macro (based on the$$sprintf
builtin) allows compile time format strings #1874.- Improve error reports when encountering a broken "if-catch".
- Add printf format to
$assert
and$error
#2183. - Make accepting arguments for
main
a bit more liberal, acceptingmain(int argc, ZString* argv)
- Make
$echo
and@sprintf
correctly stringify compile time initializers and slices. - Add
--sources
build option to add additional files to compile. #2097 - Support untyped second argument for operator overloading.
- The form-feed character '\f' is no longer valid white space.
- Show code that caused unreachable code #2207
- Allow generics over distinct types #2216.
- Support distrinct types as the base type of bitstructs. #2218
- Add hash::sha512 module to stdlib. #2227
- Compile time type assignment (eg
$Foo = int
) is no longer an expression. - Add
@allow_deprecated
attribute to functions to selectively allow deprecated declarations #2223. - Improve error message on pointer diff #2239.
- Compile-time comparison of constant vectors. #1575.
- $member.get supports bitstructs.
- $member.set for setting members without the *& trick.
- Initial support for #1925, does not affect C compilation yet, and doesn't try to link etc. Using "--emit-only"
Fixes
-2147483648
, MIN literals work correctly.- Splatting const slices would not be const. #2185
- Fixes to
$define
handling of binary ops. - Fixes methodsof to pick up all sorts of extension methods. #2192
--lsp
sometimes does not emit end tag #2194.- Improve Android termux detection.
- Update Android ABI.
- Fixes to
@format
checking #2199. - Distinct versions of builtin types ignore @operator overloads #2204.
- @operator macro using untyped parameter causes compiler segfault #2200.
- Make
unreachable()
only panic in safe mode. cflags
additions for targets was not handed properly. #2209$echo
would suppress warning about unreachable code. #2205- Correctly format '%c' when given a width. #2199
- Fix to
is_array_or_slice_of_char
#2214. - Method on array slice caused segfault #2211.
- In some cases, the compiler would dereference a compile time null. #2215
- Incorrect codegen if a macro ends with unreachable and is assigned to something. #2210
- Fix error for named arguments-order with compile-time arguments #2212
- Bug in AST copying would make operator overloading like
+=
compile incorrectly #2217. $defined(#expr)
broken with binary. #2219- Method ambiguity when importing parent module publicly in private submodule. #2208
- Linker errors when shadowing @Local with public function #2198
- Bug when offsetting pointers of large structs using ++ and --.
x++
andx--
works on pointer vectors #2222.x += 1
andx -= 1
works propertly on pointer vectors #2222.- Fixes to
x += { 1, 1 }
for enum and pointer vectors #2222. - Linking fails on operator method imported as
@public
#2224. - Lambda C-style vaargs were not properly rejected, leading to crash #2229.
- Incorrect handling of constant null fault causing compiler crash #2232.
- Overload resolution fixes to inline typedef #2226.
math::overflow_*
wrappers incorrectly don't allow distinct integers #2221.- Compiler segfault when using distinct type in attribute imported from other module #2234.
- Assert casting bitstruct to short/char #2237.
- @tag didn't work with members #2236.
- Assert comparing untyped lists #2240.
- Fix bugs relating to optional interface addr-of #2244.
- Compiler null pointer when building a static-lib with -o somedir/... #2246
- Segfault in the compiler when using a bitstruct constant defined using a cast with an operator #2248.
- Default assert() message drops parens #2249.
Stdlib changes
- Deprecate
String.is_zstr
andString.quick_zstr
#2188. - Add comparison with
==
for ZString types. is_array_or_slice_of_char
andis_arrayptr_or_slice_of_char
are replaced by constant@
variants.@pool
now has an optionalreserve
parameter, some minor changes to the temp_allocator API- io::struct_to_format now supports bitstructs.
- Add
String.escape
,String.unescape
for escaping and unescaping a string.
Version 0.7.2
Changelist
Changes / improvements
- Better default assert messages when no message is specified #2122
- Add
--run-dir
, to specify directory for running executable usingcompile-run
andrun
#2121. - Add
run-dir
to project.json. - Add
quiet
to project.json. - Deprecate uXX and iXX bit suffixes.
- Add experimental LL / ULL suffixes for int128 and uint128 literals.
- Allow the right hand side of
|||
and&&&
be runtime values. - Added
@rnd()
compile time random function (using the$$rnd()
builtin). #2078 - Add
math::@ceil()
compile time ceil function. #2134 - Improve error message when using keywords as functions/macros/variables #2133.
- Deprecate
MyEnum.elements
. - Deprecate
SomeFn.params
. - Improve error message when encountering recursively defined structs. #2146
- Limit vector max size, default is 4096 bits, but may be increased using --max-vector-size.
- Allow the use of
has_tagof
on builtin types. @jump
now included in--list-attributes
#2155.- Add
$$matrix_mul
and$$matrix_transpose
builtins. - Add
d
as floating point suffix fordouble
types. - Deprecate
f32
,f64
andf128
suffixes. - Allow recursive generic modules.
- Add deprecation for
@param foo "abc"
. - Add
--header-output
andheader-output
options for controlling header output folder. - Generic faults is disallowed.
Fixes
- Assert triggered when casting from
int[2]
touint[2]
#2115 - Assert when a macro with compile time value is discarded, e.g.
foo();
wherefoo()
returns an untyped list. #2117 - Fix stringify for compound initializers #2120.
- Fix No index OOB check for
[:^n]
#2123. - Fix regression in Time diff due to operator overloading #2124.
- attrdef with any invalid name causes compiler assert #2128.
- Correctly error on
@attrdef Foo = ;
. - Contract on trying to use Object without initializing it.
- Variable aliases of aliases would not resolve correctly. #2131
- Variable aliases could not be assigned to.
- Some folding was missing in binary op compile time resolution #2135.
- Defining an enum like
ABC = { 1 2 }
was accidentally allowed. - Using a non-const as the end range for a bitstruct would trigger an assert.
- Incorrect parsing of ad hoc generic types, like
Foo{int}****
#2140. - $define did not correctly handle generic types #2140.
- Incorrect parsing of call attributes #2144.
- Error when using named argument on trailing macro body expansion #2139.
- Designated const initializers with
{}
would overwrite the parent field. - Empty default case in @jump switch does not fallthrough #2147.
&&&
was accidentally available as a valid prefix operator.- Missing error on default values for body with default arguments #2148.
--path
does not interact correctly with relative path arguments #2149.- Add missing
@noreturn
toos::exit
. - Implicit casting from struct to interface failure for inheriting interfaces #2151.
- Distinct types could not be used with tagof #2152.
$$sat_mul
was missing.for
with incorrectvar
declaration caused crash #2154.- Check pointer/slice/etc on
[out]
and&
params. #2156. - Compiler didn't check foreach over flexible array member, and folding a flexible array member was allowed #2164.
- Too strict project view #2163.
- Bug using
#foo
arguments with$defined
#2173 - Incorrect ensure on String.split.
- Removed the naive check for compile time modification, which fixes #1997 but regresses in detection.
Stdlib changes
- Added
String.quick_ztr
andString.is_zstr
- std::ascii moved into std::core::ascii. Old _m variants are deprecated, as is uint methods.
- Add
String.tokenize_all
to replace the now deprecatedString.splitter
- Add
String.count
to count the number of instances of a string. - Add
String.replace
andString.treplace
to replace substrings within a string. - Add
Duration * Int
andClock - Clock
overload. - Add
DateTime + Duration
overloads. - Add
Maybe.equals
and respective==
operator when the inner type is equatable. - Add
inherit_stdio
option toSubProcessOptions
to inherit parent's stdin, stdout, and stderr instead of creating pipes. #2012 - Remove superfluous
cleanup
parameter inos::exit
andos::fastexit
. - Add
extern fn ioctl(CInt fd, ulong request, ...)
binding to libc;
Version 0.7.1
0.7.1 Change list
Changes / improvements
- Better errors on some common casting mistakes (pointer->slice, String->ZString, deref pointer->array) #2064.
- Better errors trying to convert an enum to an int and vice versa.
- Function
@require
checks are added to the caller in safe mode. #186 - Improved error message when narrowing isn't allowed.
- Operator overloading for
+ - * / % & | ^ << >> ~ == != += -= *= /= %= &= |= ^= <<= >>=
- Add
@operator_r
and@operator_s
attributes. - More stdlib tests:
sincos
,ArenaAllocator
,Slice2d
. - Make aliases able to use
@deprecated
. - Refactored stdlib file organization.
- Allow
@if
on locals. - String str = "" is now guaranteed to be null terminated. #2083
- Improved error messages on
Foo { 3, abc }
#2099. Foo[1..2] = { .baz = 123 }
inference now works. #2095- Deprecated old inference with slice copy. Copying must now ensure a slicing operator at the end of the right hand side:
foo[1..2] = bar[..]
rather than the oldfoo[1..2] = bar
. The old behaviour can be mostly retained with--use-old-slice-copy
). - Added
Enum.lookup
andEnum.lookup_field
. c3c build
picks first target rather than the first executable #2105.- New Win32 Mutex, ConditionVariable and OnceFlag implementation
Fixes
- Trying to cast an enum to int and back caused the compiler to crash.
- Incorrect rounding at compile time going from double to int.
- Regression with invalid setup of the WASM temp allocator.
- Correctly detect multiple overloads of the same type.
- ABI bug on x64 Linux / MacOS when passing a union containing a struct of 3 floats. #2087
- Bug with slice acces as inline struct member #2088.
@if
now does implicit conversion to bool like$if
. #2086- Fix broken enum inline -> bool conversions #2094.
@if
was ignored on attrdef, regression 0.7 #2093.@ensure
was not included when the function doesn't return a value #2098.- Added missing
@clone_aligned
and add checks to@tclone
- Comparing a distinct type with an enum with an inline distinct type failed unexpectedly.
- The
%s
would not properly print function pointers. - Compiler crash when passing an untyped list as an argument to
assert
#2108. @ensure
should be allowed to read "out" variables. #2107- Error message for casting generic to incompatible type does not work properly with nested generics #1953
- Fixed enum regression after 0.7.0 enum change.
- ConditionVariable now properly works on Win32
Stdlib changes
- Hash functions for integer vectors and arrays.
- Prefer
math::I
andmath::I_F
formath::IMAGINARY
andmath::IMAGINARYF
the latter is deprecated. - Add
array::contains
to check for a value in an array or slice.
Version 0.7.0
Changes / improvements
- Removed
Foo { 1, 2 }
initializer. - Changed
Foo(<int>)
toFoo {int}
. - Removed
{| |}
expression blocks. - Removed macro
&ref
and$varef
parameters. - Removed
$vaexpr(0)
syntax in favour of$vaexpr[0]
- Enum does not cast to/from an integer (its ordinal).
- Removed use of
void!
for main, test and benchmark functions. - Removed
$or
,$and
,$concat
compile time functions. - Removed
@adhoc
attribute. - Disallow inline use of nested generics (e.g.
List{List{int}}
. - Remove
.allocator = allocator
syntax for functions. - Remove
@operator(construct)
. - Removal of "any-switch".
- Allow swizzling assign, eg.
abc.xz += { 5, 10 };
- Added
$$wstr16
and$$wstr32
builtins. $foreach
"()" replaced by trailing ":"$foreach ($x, $y : $foo)
->$foreach $x, $y : $foo:
$for
"()" replaced by trailing ":"$for (var $x = 0; $x < FOO; $x++)
->$for var $x = 0; $x < FOO; $x++:
$switch
"()" replaced by trailing ":"$switch ($Type)
->$switch $Type:
- Empty
$switch
requires trailing ":"$switch
->$switch:
- Rename
@return!
to@return?
and change syntax to require ":" after faults. - Remove
if (catch foo) { case ... }
syntax. - Remove
[?]
syntax. - Change
int!
toint?
syntax. - New
fault
declaration usingfaultdef
. - Enum associated values can reference the calling enum.
- Improve error message on
foo ?? io::EOF
with missing '?' #2036 - Make
@public
import recursive. #2018 - Fault nameof prefixes the first last module path, for instance
std::io::EOF
is rendered asio::EOF
. - Rename
def
toalias
. - Change
distinct
->typedef
. - Order of attribute declaration is changed for
alias
. - Added
LANGUAGE_DEV_VERSION
env constant. - Rename
anyfault
->fault
. !!foo
now works same as as! ! foo
.- Temp allocator now supports more than 2 in-flight stacks.
- Printing stacktrace uses its own temp allocator.
- Allow inferred type on body parameters. E.g.
@stack_mem(1024; alloc) { ... };
- Use
@pool_init()
to set up a temp pool on a thread. Only the main thread has implicit temp pool setup. tmem
is now a variable.- Compile test and benchmark functions when invoking
--lsp
#2058. - Added
@format
attribute for compile time printf validation #2057. - Formatter no longer implicitly converts enums to ordinals.
Fixes
- Fix address sanitizer to work on MachO targets (e.g. MacOS).
- Post and pre-decrement operators switched places for vector elements #2010.
- Aliases were incorrectly considered compile time constants.
- FreeBSD libc stat definitions were incorrect.
- Atomic max was incorrect.
"+".to_float()
would panic.import
can now both be @public and @norecurse.- Crash when trying to convert a struct slice to a vector #2039.
- Crash resolving a method on
Foo[2]
whenFoo
is distinct #2042. - Bug due to missing cast when doing
$i[$x] = $z
. - Incorrectly allowed getting pointer to a macro #2049.
- &self not runtime null-checked in macro #1827.
- Bug when printing a boolean value as an integer using printf.
- Show error when a generic module contains a self-generic type.
- "Single module" was not enforced when creating a static library using as a project target.
Stdlib changes
new_*
functions in general moved to version withoutnew_
prefix.string::new_from_*
changed tostring::from_*
.String.to_utf16_copy
and related changed toString.to_utf16
.String.to_utf16_tcopy
and related changed toString.to_temp_utf16
mem::temp_new
changed tomem::tnew
.mem::temp_alloc
and related changed tomem::talloc
.mem::temp_new_array
changed tomem::temp_array
.- Add
ONHEAP
variants for List/HashMap for initializing global maps on the heap. - Remove Vec2 and other aliases from std::math. Replace
.length_sq()
withsq_magnitude()
- Change all hash functions to have a common
hash
function. @wstring
,@wstring32
,@char32
and@char16
compile time macros added.- Updates to
Atomic
to handle distinct types and booleans. - Added
math::iota
. @pool
no longer takes an argument.Allocator
interface removesmark
andreset
.- DynamicArenaAllocator has changed init function.
- Added
BackedArenaAllocator
which is allocated to a fixed size, then allocates on the backing allocator and supports mark/reset. AnyList
now also defaults to the temp allocator.os::getcwd
andos::get_home_dir
requires an explicit allocator.file::load_new
andfile::load_path_new
removed.os::exit
andos::fastexit
added.
Version 0.6.8
Changes / improvements
- Increase precedence of
(Foo) { 1, 2 }
- Add
--enable-new-generics
to enableFoo{int}
generic syntax. {| |}
expression blocks deprecated.- c3c
--test-leak-report
flag for displaying full memory lead report if any - Output into /.build/obj/ by default.
- Output llvm/asm into llvm/ and asm/ by default.
- Add flag
--suppress-run
. For commands which may run executable after building, skip the run step. #1931 - Add
--build-env
for build environment information. - Deprecation of
@operator(construct)
.
Fixes
- Bug appearing when
??
was combined with boolean in some cases. - Test runner --test-disable-sort didn't work, c3c was expecting --test-nosort
- Test runner with tracking allocator assertion at failed test #1963
- Test runner with tracking allocator didn't properly handle teardown_fn
- Correctly give an error if a character literal contains a line break.
- Implicitly unwrapped optional value in defer incorrectly copied #1982.
- Crash when trying to define a method macro that isn't
@construct
but has no arguments. - Regression,
.gitkeep
files were generated incorrectly. - Aliases are now correctly handled as if they were variables/functions in regards to namespacing and accept
@builtin
. - Correctly handle in/out when interacting with inout.
- Don't delete .o files not produced by the compiler.
- Fix optional jumps in expression lists, #1942.
- Several fixes for .o files and -o output, improving handling and naming.
- Fix bug casting bool to int to other int #1995.
@if
declarations were missing from -P output #1973.- Check exe and lib output so -o works with directories.
- Swizzling an inline vector in a struct would cause a crash.
- Fixed error and poor error message when using an invalid target name.
Version 0.6.7
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
andlinux-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 onlydefault
#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 iffoo
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
andPOLL_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 ofa ? x : y
at compile time. HashMap
is nowPrintable
.- Add
allocator::wrap
to create an arena allocator on the stack from bytes.