Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: unrecognized command-line option ‘--std=c23’ #358

Open
Ratio2 opened this issue Oct 6, 2024 · 1 comment
Open

error: unrecognized command-line option ‘--std=c23’ #358

Ratio2 opened this issue Oct 6, 2024 · 1 comment

Comments

@Ratio2
Copy link
Contributor

Ratio2 commented Oct 6, 2024

Version: master

The latest version of Debian contains gcc version 12. It makes sense to replace c23 with gnu2x (c2x not enough)

$ make
...
cc: error: unrecognized command-line option ‘--std=c23’; did you mean ‘--std=c2x’?
@gf-mse
Copy link

gf-mse commented Nov 17, 2024

Probably should have opened a separate issue for this, but not sure if the new standards are more relaxed and allow the below; with either of --std=gnu11 or --std=gnu2x on gcc 11.4.0 had to remove the "delete this" definition of struct list_head to make it compile :

--- results-tree.h      2024-11-17 18:51:29.857791001 +1100
+++ results-tree.h      2024-11-17 19:28:22.163097579 +1100
@@ -21,10 +21,12 @@
 
 #include "csum.h"
 
+#include "list.h"
+
 // TODO: delete this
-struct list_head {
-       struct list_head *next, *prev;
-};
+// struct list_head {
+//     struct list_head *next, *prev;
+// };
 
 struct results_tree {
        struct rb_root  root;

Otherwise the build (as of commit c389d3d5309ed5641aae8cb5d7a255019396bf86) seems to complete Ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants