https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/117364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zygoloid approved this pull request.
https://github.com/llvm/llvm-project/pull/117364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/117364
>From 37923ec9c6a0bbabd2640f7e95549bf560974e59 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 22 Nov 2024 14:18:33 -0500
Subject: [PATCH 1/5] [C23] Fixed the value of BOOL_WIDTH
---
clang/docs/Re
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/117364
>From 37923ec9c6a0bbabd2640f7e95549bf560974e59 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 22 Nov 2024 14:18:33 -0500
Subject: [PATCH 1/4] [C23] Fixed the value of BOOL_WIDTH
---
clang/docs/Re
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/117364
>From 37923ec9c6a0bbabd2640f7e95549bf560974e59 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 22 Nov 2024 14:18:33 -0500
Subject: [PATCH 1/3] [C23] Fixed the value of BOOL_WIDTH
---
clang/docs/Re
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -verify -std=c23 -ffreestanding %s
+
+/* WG14 N2412: Clang 14
+ * Two's complement sign representation
+ */
+// expected-no-diagnostics
+
+#include
+
+// GH117348 -- BOOL_WIDTH was accidentally expanding to the number of bits in
+// the object
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/117364
>From 37923ec9c6a0bbabd2640f7e95549bf560974e59 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Fri, 22 Nov 2024 14:18:33 -0500
Subject: [PATCH 1/2] [C23] Fixed the value of BOOL_WIDTH
---
clang/docs/Re
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
https://github.com/Sirraide approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/117364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
https://github.com/jyknight approved this pull request.
https://github.com/llvm/llvm-project/pull/117364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -verify -std=c23 -ffreestanding %s
+
+/* WG14 N2412: Clang 14
+ * Two's complement sign representation
+ */
+// expected-no-diagnostics
+
+#include
+
+// GH117348 -- BOOL_WIDTH was accidentally expanding to the number of bits in
+// the object
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/117364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Aaron Ballman (AaronBallman)
Changes
The standard mandates that this returns the width of the type, which is the
number of bits in the value. For bool, that's required to be `1` explicitly.
---
Full diff: https://github.com/llvm/llvm-proj
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/117364
The standard mandates that this returns the width of the type, which is the
number of bits in the value. For bool, that's required to be `1` explicitly.
>From 37923ec9c6a0bbabd2640f7e95549bf560974e59 Mon S
22 matches
Mail list logo