[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
portability: multiple typedefs
From: |
Akim Demaille |
Subject: |
portability: multiple typedefs |
Date: |
Mon, 3 Aug 2020 07:31:22 +0200 |
commit 0a5bfb4fda7654bfda701f825c796e54150545a1
Author: Akim Demaille <akim.demaille@gmail.com>
Date: Mon Aug 3 06:26:34 2020 +0200
portability: multiple typedefs
Older versions of GCC (4.1.2 here) don't like repeated typedefs.
CC src/bison-parse-simulation.o
src/parse-simulation.c:61: error: redefinition of typedef 'parse_state'
src/parse-simulation.h:74: error: previous declaration of 'parse_state'
was here
make: *** [Makefile:7876: src/bison-parse-simulation.o] Error 1
Reported by Nelson H. F. Beebe.
* src/parse-simulation.c (parse_state): Don't typedef,
parse-simulation.h did it already.
diff --git a/src/parse-simulation.c b/src/parse-simulation.c
index ba09c44c..70bfb177 100644
--- a/src/parse-simulation.c
+++ b/src/parse-simulation.c
@@ -28,7 +28,7 @@
#include "lssi.h"
#include "nullable.h"
-typedef struct parse_state
+struct parse_state
{
// Path of state-items the parser has traversed.
struct si_chunk
@@ -58,7 +58,7 @@ typedef struct parse_state
// Causes chunk contents to be freed when the reference count is
// one. Used when only the chunk metadata will be needed.
bool free_contents_early;
-} parse_state;
+};
static void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- portability: multiple typedefs,
Akim Demaille <=