summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-04-23 11:13:30 +0000
committerBruno Haible <bruno@clisp.org>2003-04-23 11:13:30 +0000
commit7ccc2cf1326af3ee7b2709e3dbc3036a63c63cbe (patch)
treeb6ffae2b1a9783da4d6c04275fd84c178ef88273
parent7d38b21efa00b4d9e8d3883d3a98bda1665501c7 (diff)
downloadgperf-7ccc2cf1326af3ee7b2709e3dbc3036a63c63cbe.tar.gz
Portability fix.
-rw-r--r--ChangeLog5
-rw-r--r--src/keyword-list.icc4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 83e61b2..daf970c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-07 Bruno Haible <bruno@clisp.org>
+
+ * src/keyword-list.icc (KeywordExt_List::rest): Use a portable cast.
+ (Only in GCC a cast of an lvalue is an lvalue.)
+
2003-01-01 Bruno Haible <bruno@clisp.org>
* src/options.cc (Options::parse_options): Update copyright year.
diff --git a/src/keyword-list.icc b/src/keyword-list.icc
index 233e2d3..5c17a19 100644
--- a/src/keyword-list.icc
+++ b/src/keyword-list.icc
@@ -1,6 +1,6 @@
/* Inline Functions for keyword-list.{h,cc}.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>.
This file is part of GNU GPERF.
@@ -49,5 +49,5 @@ KeywordExt_List::first () const
INLINE KeywordExt_List *&
KeywordExt_List::rest ()
{
- return static_cast<KeywordExt_List*>(_cdr);
+ return *reinterpret_cast<KeywordExt_List**>(&_cdr);
}