v0.6.1
版本发布时间: 2024-07-24 21:26:44
c3lang/c3c最新发布版本:latest(2024-09-01 06:03:50)
Changes / improvements
- Addition of $append and $concat functions.
- Added $$str_hash, $$str_upper, $$str_lower, $$str_find builtins.
- Improved error notes when call expressions have errors.
- Trailing body arguments may now be
&ref
,#hash
,$const
and$Type
arguments. - "panic-msg" setting to suppress panic message output.
- Require
@export
functions to have@export
types. - Disallow leading/trailing/duplicate '_' in module names.
- Updated mangling.
- Added
$$unaligned_load
and$$unaligned_store
. -
--no-headers
option to suppress creating headers when generating a library. - Support c-file compilation in libraries.
- Allow using $defined(&a[1]) to check if the operation is supported.
- Max number of members in a struct is limited to 65535.
- The maximum number of parameters in a call is now 255, up from 127.
- Array comparison now uses built-in memcmp on LLVM to enable optimizations.
- Prevent implicit array casts to pointers with higher alignment #1237.
- Macro
$case
statements now pick the first match and does not evaluate the rest. -
manifest.json
is now checked for incorrect keys. - Added
--list-manifest-properties
to list the available properties inmanifest.json
. - Indexing into a constant array / struct now works at compile time.
- Improved error message when trying user foreach with an untyped list.
Fixes
- Error with unsigned compare in
@ensure
when early returning 0 #1207. - Prevent Mach-O from removing
@init
and@dynamic
in a more reliable way #1200. - Fix of missing copy of parameterized custom attributes.
- Fixed crash on certain recursive function definitions #1209.
- Return the typekind "FUNC" for a function pointer.
- No longer possible to dereference a function pointer.
- Fix bug with @jump miscompile.
- Bit negate does implicit integer promotion.
- Bitstructs, unions and flexible arrays now correctly emitted in headers.
- Fix distinct inline conversions.
- Bit negating const zero flags would give an incorrect result.
- Fix to scalar -> vector conversions.
- Bug fix for rethrow + defer catch.
- Wrong size for structs containing overaligned structs #1219
- $typeof(*x) should be valid when x is an
[out]
parameter #1226 - Fix ABI lowering for 128 bit vectors on Linux.
- Bad error message when using a generic method without generic parameters #1228
- Private function called from nested macro not visible to linker #1232
- Bitstructs in structs would not be correctly be handled in some cases.
- Fix problem where a $$FUNC would return "<GLOBAL>" when evaluated for a static in a function #1236.
-
ordinal
is no longer a valid associated value name for enums. - Constants defined by indexing into another constant could fail codegen.
- Stdlib nolibc code bugs fixed.
- Regression: duplicate symbols with static variable declared in macro #1248.
- Unsplat with named parameters was accidentally disallowed.
- Reference parameter doesn't work with vector subscript #1250.
- The msvc_sdk script failed to work properly on windows when run in folders with spaces.
Stdlib changes
- Added
remove_first_item
remove_last_item
andremove_item
as aliases for thematch
functions. - Added @str_hash, @str_upper, @str_lower, @str_find compile time macros.
- Remove "panic" text from unreachable() when safe mode is turned off.
- Added
@unaligned_store
and@unaligned_load
. - Null ZString, DString or pointer prints "(null)" for printf.
- Updated sorting API.
- Insertion sort and counting sort added.
- Added missing
mem
andmem::allocator
functions for aligned allocations. - Added
new_init_with_array
andtemp_init_with_array
for List. - Fixed posix
NativeMutex.lock_timeout
. - Fixed
env::ARCH_32_BIT
andenv::ARCH_64_BIT
. - Added
time::us
.
1、 c3-linux-debug.tar.gz 39.09MB
2、 c3-linux.tar.gz 39.23MB
3、 c3-macos-debug.zip 58.55MB
4、 c3-macos.zip 58.29MB
5、 c3-ubuntu-20-debug.tar.gz 36.62MB
6、 c3-ubuntu-20.tar.gz 36.74MB
7、 c3-windows-debug.zip 56.66MB
8、 c3-windows.zip 30.2MB