From ab5e4c63e801a7b424d6638c353ea37c29d84576 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 28 Mar 2022 16:47:17 -0700 Subject: [PATCH] Try to bump the C default to C11. Even the Linux kernel's moved, so let's see if we can too... Test: treehugger Change-Id: Ic8ceb3b6e7a83acc5defee46618a9345a366d87d --- cc/cc_test.go | 2 +- cc/config/global.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/cc_test.go b/cc/cc_test.go index 278efa174..3d39601d8 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -3980,7 +3980,7 @@ func TestIncludeDirectoryOrdering(t *testing.T) { cppOnly := []string{"-fPIC", "${config.CommonGlobalCppflags}", "${config.DeviceGlobalCppflags}", "${config.ArmCppflags}"} cflags := []string{"-Wall", "-Werror", "-std=candcpp"} - cstd := []string{"-std=gnu99", "-std=conly"} + cstd := []string{"-std=gnu11", "-std=conly"} cppstd := []string{"-std=gnu++17", "-std=cpp", "-fno-rtti"} lastIncludes := []string{ diff --git a/cc/config/global.go b/cc/config/global.go index 8dda53735..f7c3e354d 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -280,7 +280,7 @@ var ( "-w", } - CStdVersion = "gnu99" + CStdVersion = "gnu11" CppStdVersion = "gnu++17" ExperimentalCStdVersion = "gnu11" ExperimentalCppStdVersion = "gnu++2a"