[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2550-g84f33c
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2550-g84f33c8 |
Date: |
Fri, 21 Apr 2017 04:13:46 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, master has been updated
via 84f33c8b74c45e977ea05855f64545140dc6c2de (commit)
from b79ae74c3944bd932058a8d8257a39914666f7d3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=84f33c8b74c45e977ea05855f64545140dc6c2de
commit 84f33c8b74c45e977ea05855f64545140dc6c2de
Author: Arnold D. Robbins <address@hidden>
Date: Fri Apr 21 11:13:20 2017 +0300
Really fix the 64 bit alignment issue.
diff --git a/ChangeLog b/ChangeLog
index 39df2d4..101a89f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-04-21 Arnold D. Robbins <address@hidden>
+
+ * awk.h (NODE): Put the `val' subportion back the way it
+ was and move valref (formerly sref) out of the unions
+ entirely. This was the real problem. Rework the corresponding
+ commentary.
+ [valref]: Removed the macro definition.
+
2017-04-20 Arnold D. Robbins <address@hidden>
* configure.ac: Make letter case usage in the various
diff --git a/awk.h b/awk.h
index 33ea980..a92df46 100644
--- a/awk.h
+++ b/awk.h
@@ -365,21 +365,6 @@ typedef struct exp_node {
} nodep;
struct {
- // April 2017:
- // The NODE union will be the death of me yet. :-(
- //
- // On 64 bit Intel systems, at least, if compiling
- // without MPFR, the pointers need to come before the
- // the double. Otherwise things break pretty
- // badly. This doesn't happen on 32 bit compiles.
- // I saw this on GCC 5.4.0, GCC 6.3.0, PCC, TCC
- // and clang 3.8.0. It's way too much work to
- // try to figure out why. So I just put pointers,
- // then the double, then the size_t's, and then
- // the rest. Sigh.
- char *sp;
- wchar_t *wsp;
- struct exp_node *typre;
#ifdef HAVE_MPFR
union {
AWKNUM fltnum;
@@ -389,14 +374,31 @@ typedef struct exp_node {
#else
AWKNUM fltnum;
#endif
+ char *sp;
size_t slen;
- size_t wslen;
- long sref;
int idx;
+ wchar_t *wsp;
+ size_t wslen;
+ struct exp_node *typre;
} val;
} sub;
NODETYPE type;
unsigned int flags;
+ // April 2017:
+ // The NODE union will be the death of me yet. :-(
+ //
+ // On 64 bit Intel systems, at least, if compiling without MPFR,
+ // the valref (formerly) sref field needs to be at the end. In its
+ // original position it overlapped with stuff in the nodep part of
+ // the union causing things to break pretty badly. This doesn't
+ // happen on 32 bit compiles.
+ //
+ // I saw this on GCC 4.9.0, GCC 5.4.0, GCC 6.3.0, PCC, TCC and
+ // clang 3.8.0.
+ //
+ // We simply move valref out of the unions entirely to avoid future
+ // problems.
+ long valref;
/* type = Node_val */
/*
@@ -506,7 +508,6 @@ typedef struct exp_node {
*/
#define stptr sub.val.sp
#define stlen sub.val.slen
-#define valref sub.val.sref
#define stfmt sub.val.idx
#define wstptr sub.val.wsp
#define wstlen sub.val.wslen
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
awk.h | 37 +++++++++++++++++++------------------
2 files changed, 27 insertions(+), 18 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2550-g84f33c8,
Arnold Robbins <=