[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segmentation fault using lalr1.cc
From: |
Paul Eggert |
Subject: |
Re: Segmentation fault using lalr1.cc |
Date: |
22 Jan 2003 23:49:15 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 |
> From: Tim Van Holder <address@hidden>
> Date: 23 Jan 2003 08:17:17 +0100
> if (strcmp (filename, "@output_header_name@") == 0)
> filename = spec_defines_file;
> |=> ^^^^^^^^^^^^^^^^^ this is NULL
Thanks for the bug report. Does this patch fix things for you?
2003-01-22 Paul Eggert <address@hidden>
* data/lalr1.cc: Do not output a header unless b4_defines_flag
is set. This fixes a bug reported by Tim Van Holder.
--- data/lalr1.cc.~1.19.~ 2003-01-17 00:38:16.000000000 -0800
+++ data/lalr1.cc 2003-01-22 23:46:22.098522000 -0800
@@ -1,6 +1,6 @@
m4_divert(-1)
# C++ skeleton for Bison
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -87,9 +87,10 @@ m4_define([b4_constructor],
# We do want M4 expansion after # for CPP macros.
m4_changecom()
m4_divert(0)dnl
address@hidden @output_header_name@
+m4_if(b4_defines_flag, 0, [],
address@hidden @output_header_name@
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
- [2002])[
+ [2002, 2003])[
/* FIXME: This is wrong, we want computed header guards.
I don't know why the macros are missing now. :( */
#ifndef PARSER_HEADER_H
@@ -282,10 +283,10 @@ namespace yy
}
#endif /* ! defined PARSER_HEADER_H */]
-dnl
+])dnl
@output @output_parser_name@
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
- [2002])[
+ [2002, 2003])[
#include @output_header_name@
@@ -766,7 +767,7 @@ const yy::]b4_parser_class_name[::TokenN
]b4_epilogue
dnl
@output stack.hh
-b4_copyright([2002])[
+b4_copyright([2002, 2003])[
#ifndef BISON_STACK_HH
# define BISON_STACK_HH
@@ -863,7 +864,7 @@ namespace yy
#endif // not BISON_STACK_HH]
dnl
@output location.hh
-b4_copyright([2002])[
+b4_copyright([2002, 2003])[
#ifndef BISON_LOCATION_HH
# define BISON_LOCATION_HH