This silences Clang warnings like this:
../math/fmal.c:34:3: warning: packed attribute is unnecessary for 'struct
x87reg_::(anonymous at ../math/fmal.c:34:3)' [-Wpacked]
No attribute is needed for making these structs keep their
intended layout.
While Clang did warn about the other cases, it didn't warn about
the case in math/frexpl.c being unnecessary - but this one isn't
necessary either.
Signed-off-by: Martin Storsjö <[email protected]>
---
mingw-w64-crt/math/arm-common/log2.c | 4 ++--
mingw-w64-crt/math/fma.c | 2 +-
mingw-w64-crt/math/fmaf.c | 2 +-
mingw-w64-crt/math/fmal.c | 2 +-
mingw-w64-crt/math/frexp.c | 2 +-
mingw-w64-crt/math/frexpl.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/mingw-w64-crt/math/arm-common/log2.c
b/mingw-w64-crt/math/arm-common/log2.c
index 7d9c89087..febd29cea 100644
--- a/mingw-w64-crt/math/arm-common/log2.c
+++ b/mingw-w64-crt/math/arm-common/log2.c
@@ -8,7 +8,7 @@
#include <stdint.h>
typedef union ieee754_double_ {
- struct __attribute__((__packed__)) {
+ struct {
uint64_t f52 : 52;
uint64_t exp : 11;
uint64_t sgn : 1;
@@ -17,7 +17,7 @@ typedef union ieee754_double_ {
} ieee754_double;
typedef union ieee754_float_ {
- struct __attribute__((__packed__)) {
+ struct {
uint32_t f23 : 23;
uint32_t exp : 8;
uint32_t sgn : 1;
diff --git a/mingw-w64-crt/math/fma.c b/mingw-w64-crt/math/fma.c
index 644a6f6b7..23bca66bf 100644
--- a/mingw-w64-crt/math/fma.c
+++ b/mingw-w64-crt/math/fma.c
@@ -40,7 +40,7 @@ double fma(double x, double y, double z){
* avoid. It is kept in the very last position.
*/
typedef union iec559_double_ {
- struct __attribute__((__packed__)) {
+ struct {
uint64_t mlo : 27;
uint64_t mhi : 25;
uint64_t exp : 11;
diff --git a/mingw-w64-crt/math/fmaf.c b/mingw-w64-crt/math/fmaf.c
index 2773c5435..bcfc1faa1 100644
--- a/mingw-w64-crt/math/fmaf.c
+++ b/mingw-w64-crt/math/fmaf.c
@@ -40,7 +40,7 @@ float fmaf(float x, float y, float z){
* avoid. It is kept in the very last position.
*/
typedef union iec559_float_ {
- struct __attribute__((__packed__)) {
+ struct {
uint32_t mlo : 13;
uint32_t mhi : 10;
uint32_t exp : 8;
diff --git a/mingw-w64-crt/math/fmal.c b/mingw-w64-crt/math/fmal.c
index 3db856e7c..71de1830f 100644
--- a/mingw-w64-crt/math/fmal.c
+++ b/mingw-w64-crt/math/fmal.c
@@ -31,7 +31,7 @@ long double fmal(long double x, long double y, long double z){
* them in the other end.
*/
typedef union x87reg_ {
- struct __attribute__((__packed__)) {
+ struct {
uint64_t mlo : 33;
uint64_t mhi : 31;
uint16_t exp : 15;
diff --git a/mingw-w64-crt/math/frexp.c b/mingw-w64-crt/math/frexp.c
index 69086daf8..5dfabe7b4 100644
--- a/mingw-w64-crt/math/frexp.c
+++ b/mingw-w64-crt/math/frexp.c
@@ -14,7 +14,7 @@ double frexp(double value, int* exp);
* This is true on x86 and ARM. */
typedef union ieee754_double_ {
- struct __attribute__((__packed__)) {
+ struct {
uint64_t f52 : 52;
uint64_t exp : 11;
uint64_t sgn : 1;
diff --git a/mingw-w64-crt/math/frexpl.c b/mingw-w64-crt/math/frexpl.c
index f60b68bcd..365ae9448 100644
--- a/mingw-w64-crt/math/frexpl.c
+++ b/mingw-w64-crt/math/frexpl.c
@@ -21,7 +21,7 @@ long double frexpl(long double value, int* exp)
/*
https://en.wikipedia.org/wiki/Extended_precision#x86_extended_precision_format
*/
typedef union x87reg_ {
- struct __attribute__((__packed__)) {
+ struct {
uint64_t f64;
uint16_t exp : 15;
uint16_t sgn : 1;
--
2.43.0
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public