mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix error maybe-uninitialized (#2230)
* Add build instructions for Arch Linux * Fix error maybe-uninitialized in llvm_codegen_expr.c when compiling with clang 20.1.6
This commit is contained in:
committed by
GitHub
parent
8d698b5e40
commit
2e42868467
@@ -379,8 +379,7 @@ The c3c binary should be created in the build directory. You can try it out by r
|
||||
```bash
|
||||
cmake -B build \
|
||||
-D C3_LINK_DYNAMIC=ON \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D CMAKE_C_FLAGS_RELEASE="-Wno-error=maybe-uninitialized"
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
5. Build the project: `make -C build`.
|
||||
|
||||
|
||||
@@ -2051,7 +2051,7 @@ static inline LLVMValueRef llvm_emit_inc_dec_value(GenContext *c, SourceSpan spa
|
||||
Type *element = type_lowering(type->array.base);
|
||||
LLVMValueRef diff_value;
|
||||
bool is_integer = type_kind_is_any_integer(element->type_kind);
|
||||
bool is_ptr;
|
||||
bool is_ptr = false;
|
||||
if (is_integer)
|
||||
{
|
||||
diff_value = LLVMConstInt(llvm_get_type(c, element), 1, false);
|
||||
|
||||
Reference in New Issue
Block a user