Module Name:    src
Committed By:   rillig
Date:           Sun Jan  3 21:12:03 UTC 2021

Modified Files:
        src/usr.bin/make: lst.h

Log Message:
make(1): remove anonymous union from struct ListNode

Anonymous structs and unions have been introduced in C11.  The code of
make is supposed to be compatible with C90 though.

The additional members were intended to be used during an interactive
debugging session only and were thus not relevant to running the actual
code.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/usr.bin/make/lst.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/lst.h
diff -u src/usr.bin/make/lst.h:1.94 src/usr.bin/make/lst.h:1.95
--- src/usr.bin/make/lst.h:1.94	Wed Dec 30 10:03:16 2020
+++ src/usr.bin/make/lst.h	Sun Jan  3 21:12:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: lst.h,v 1.94 2020/12/30 10:03:16 rillig Exp $	*/
+/*	$NetBSD: lst.h,v 1.95 2021/01/03 21:12:03 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -90,11 +90,7 @@ typedef struct ListNode ListNode;
 struct ListNode {
 	ListNode *prev;		/* previous node in list, or NULL */
 	ListNode *next;		/* next node in list, or NULL */
-	union {
-		void *datum;	/* datum associated with this element */
-		const struct GNode *priv_gnode; /* alias, just for debugging */
-		const char *priv_str; /* alias, just for debugging */
-	};
+	void *datum;		/* datum associated with this element */
 };
 
 struct List {

Reply via email to