https://github.com/spavloff closed
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
spavloff wrote:
> The changes should come with a release note so that users know about the
> behavioral change, but otherwise LGTM.
Pragma FENV_ROUND is still officially unsupported, compiler issues a warning
about this. It is https://github.com/llvm/llvm-project/pull/89617 that makes
FENV_RO
https://github.com/AaronBallman approved this pull request.
The changes should come with a release note so that users know about the
behavioral change, but otherwise LGTM.
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cf
spavloff wrote:
Are there any other comments? Can this PR be considered as approved?
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcranmer-intel commented:
I'm generally happy with the testing and semantics at this point.
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
spavloff wrote:
Explicit instantiati
https://github.com/spavloff updated
https://github.com/llvm/llvm-project/pull/90877
>From 5d906b537636ca0d8706a8a888dd78edfbec684f Mon Sep 17 00:00:00 2001
From: Serge Pavlov
Date: Thu, 2 May 2024 22:28:05 +0700
Subject: [PATCH 01/10] [clang] Use constant rounding mode for floating
literals
C
https://github.com/spavloff updated
https://github.com/llvm/llvm-project/pull/90877
>From 5d906b537636ca0d8706a8a888dd78edfbec684f Mon Sep 17 00:00:00 2001
From: Serge Pavlov
Date: Thu, 2 May 2024 22:28:05 +0700
Subject: [PATCH 1/8] [clang] Use constant rounding mode for floating literals
Conv
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 1aeb64c8ec7b96b2301929d8a325a6e1d9ddaa2f
cf6ff55ad4a45875a821b3ac82c22bb7917b4d67 --
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 1aeb64c8ec7b96b2301929d8a325a6e1d9ddaa2f
aeb607513587924106081213335f73ba6eb0 --
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
jcranmer-intel wrote:
The interactio
jcranmer-intel wrote:
I've been doing some testing, and I do want to confirm my understanding of the
C standard here.
>From what I can tell, macro expansion (phase 4) happens before constants are
>parsed (phase 7). As a result, if you have code like this:
```c
#define CONSTANT 0.1f
```
the int
https://github.com/spavloff updated
https://github.com/llvm/llvm-project/pull/90877
>From 5d906b537636ca0d8706a8a888dd78edfbec684f Mon Sep 17 00:00:00 2001
From: Serge Pavlov
Date: Thu, 2 May 2024 22:28:05 +0700
Subject: [PATCH 1/7] [clang] Use constant rounding mode for floating literals
Conv
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
>Does this test ad
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
spavloff wrote:
> Does the FENV_ROUN
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
> In this snippet
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
spavloff wrote:
In this snippet `Val
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
Ah, I see that git
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spavloff updated
https://github.com/llvm/llvm-project/pull/90877
>From 5d906b537636ca0d8706a8a888dd78edfbec684f Mon Sep 17 00:00:00 2001
From: Serge Pavlov
Date: Thu, 2 May 2024 22:28:05 +0700
Subject: [PATCH 1/5] [clang] Use constant rounding mode for floating literals
Conv
@@ -79,3 +79,16 @@ float V7 = []() -> float {
0x0.01p0F);
}();
// CHECK: @V7 = {{.*}} float 1.00e+00
+
+template struct L {
+ constexpr L() : value(V) {}
+ float value;
+};
+
+#pragma STDC FENV_ROUND FE_DOWNWARD
erichkeane wrote:
I meant something
https://github.com/spavloff updated
https://github.com/llvm/llvm-project/pull/90877
>From 5d906b537636ca0d8706a8a888dd78edfbec684f Mon Sep 17 00:00:00 2001
From: Serge Pavlov
Date: Thu, 2 May 2024 22:28:05 +0700
Subject: [PATCH 1/4] [clang] Use constant rounding mode for floating literals
Conv
https://github.com/spavloff updated
https://github.com/llvm/llvm-project/pull/90877
>From 5d906b537636ca0d8706a8a888dd78edfbec684f Mon Sep 17 00:00:00 2001
From: Serge Pavlov
Date: Thu, 2 May 2024 22:28:05 +0700
Subject: [PATCH 1/2] [clang] Use constant rounding mode for floating literals
Conv
erichkeane wrote:
Also, test failures are related to this patch!
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3858,7 +3858,8 @@ static Expr *BuildFloatingLiteral(Sema &S,
NumericLiteralParser &Literal,
using llvm::APFloat;
APFloat Val(Format);
- APFloat::opStatus result = Literal.GetFloatValue(Val);
+ APFloat::opStatus result =
erichkeane wrote:
Does this
https://github.com/erichkeane commented:
probably needs a release note
https://github.com/llvm/llvm-project/pull/90877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/90877
___
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: Serge Pavlov (spavloff)
Changes
Conversion of floating-point literal to binary representation must be made
using constant rounding mode, which can be changed using pragma FENV_ROUND. For
example, the literal "0.1F" should be representes b
https://github.com/spavloff created
https://github.com/llvm/llvm-project/pull/90877
Conversion of floating-point literal to binary representation must be made
using constant rounding mode, which can be changed using pragma FENV_ROUND. For
example, the literal "0.1F" should be representes by ei
29 matches
Mail list logo