less/less-429-strict_aliasing.patch

25 lines
820 B
Diff
Raw Normal View History

The strict aliasing rules are broken without this patch becase there
is defined a pointer to the "struct tag" and the structure is defined
later.
================================================================================
--- tags.c
+++ tags.c
@@ -63,8 +63,6 @@
struct tag *tl_first;
struct tag *tl_last;
};
-#define TAG_END ((struct tag *) &taglist)
-static struct taglist taglist = { TAG_END, TAG_END };
struct tag {
struct tag *next, *prev; /* List links */
char *tag_file; /* Source file containing the tag */
@@ -72,6 +70,8 @@
char *tag_pattern; /* Pattern used to find the tag */
char tag_endline; /* True if the pattern includes '$' */
};
+#define TAG_END ((struct tag *) &taglist)
+static struct taglist taglist = { TAG_END, TAG_END };
static struct tag *curtag;
#define TAG_INS(tp) \