New package: c3c-0.7.0#55087
New package: c3c-0.7.0#55087hyperpastel wants to merge 1 commit intovoid-linux:masterfrom hyperpastel:c3c
Conversation
|
I've implemented the changes, thank you so much for your input and feedback 😊 I amended locally and then pushed to the remote, was this the right way of doing this, or should I have done something differently with the 'reviewed changes' and 'conversation' sections GitHub showed? |
|
If I remember the process correctly, you were given a button to apply the recommended changes I gave you. It is best to ignore this button when contributing to void-packages, because it adds one commit per fix. This violates the "commit guidelines" of void-packages.
This is the correct way to deal with feedback in pull requests to void-packages. |
|
Why didn't you choose llvm19? |
|
Ah, I apologise. All the builds of c3c I ever did myself had used llvm17 so I put it here by habit. I will amend once more when I'm home. |
I don't know, I'm not a Void user. But I am a former C3 user. 😄 |
|
Apologies for my absence the past two days. I had some time today again and looked into this, and I'm pretty sure this is a defect in the i686 gcc compiler. This can be fixed with this relatively simple patch file: --- a/src/compiler/sema_expr.c
+++ b/src/compiler/sema_expr.c
@@ -5136,7 +5136,7 @@ static inline bool sema_expr_analyse_swizzle(SemaContext *context, Expr *expr, E
assert(indexed_type);
if (is_lvalue) check = CHECK_VALUE;
ASSERT_SPAN(expr, len > 0);
- int index;
+ int index = swizzle[(int)kw[0]] - 1;
bool is_overlapping = false;
for (unsigned i = 0; i < len; i++)
{
@@ -5145,10 +5145,6 @@ static inline bool sema_expr_analyse_swizzle(SemaContext *context, Expr *expr, E
{
RETURN_SEMA_ERROR(expr, "The '%c' component is not present in a vector of length %d, did you assume a longer vector?", kw[i], vec_len);
}
- if (i == 0)
- {
- index = val;
- }
if ((index ^ val) & 0x10)
{
RETURN_SEMA_ERROR(expr, "Mixing [xyzw] and [rgba] is not permitted, you will need to select one of them.");
Applying this results in compilation without errors. Should I include this patch until a better solution is found? (i.e. this gets fixed in a later version of gcc?) I will also look into using LLVM19, just changing the |
You're pretty quick to jump to conclusions. The compiler can have bugs, but they shouldn't be the first thing you think of when the compilation process fails. The problem is caused by upstream using The reported warning seems to be harmless. It could be ignored if it didn't cause a compilation error. Some googling showed me c3lang/c3c#1907 Possible solutions:
If you want to be nice, you can also notify upstream of these issues:
|
The error can be solved with It is strange though. There is not a single mention of llvm19 in the README nor are there any issues. Maybe upstream doesn't support llvm19 as well as it does llvm18 and llvm17? |
|
Thank you for your fast and detailed response yet again, meator 🥰 I apologize if my judgement is too quick. It just struck me as something weird that the same few lines of code compile without a warning on all other platforms, and only on i686, a warning is generated (which, unless I'm reading something very wrong, should not be). I have brought this to the attention of the maintainer, and I will also mention the As for the solutions, I then agree that removing this flag is probably the best. I've read the issue you've linked, but I believe this addresses different files, namely I will wait a bit for a direct response from maintainers, if nothing emerges from that, I would probably go down the |
|
As for the I did ask if there was downsides to using I could always try to test the software's behavior if linked with llvm19, but should we include |
Ah, didn't notice that. This showcases that such issues are common in c3c and that removing
If you've got confirmation that no issues will arise from using |
I discussed this with the upstream and this PR ended getting merged, so I would patch accordingly with the confirmation of the maintainer. They would like to keep I've spent a bit more time looking into using llvm19. After setting I failed with the following error: I don't know if the following is possible, but - I believe that setting So I thought to add both the path you provided earlier (which I was also able to shorten a bit, CMake still finds it without the last parts!) and the "normal" However, I was unable to set I also took the liberty to add a variable for the version of the |
|
c3lang/c3c#2103 has been merged, so in the next release both the extra |
Testing the changes
New package
Local build testing