From 4658effb1c0f01006baec2a8a5a40ee48342ef50 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 19 Aug 2000 15:54:32 +0000 Subject: [PATCH] Support for inline when generating C code which will be compiled by a C++ compiler. --- ChangeLog | 3 +++ src/key-list.cc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 84e1f84..178abff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-08-19 Bruno Haible + * src/key-list.cc (Key_List::output_hash_function): When outputting + __inline, take advantage of C++ compilers which have inline. + * src/key-list.cc (Output_Compare_Strncmp::output_comparison): After the call to strncmp, verify that expr2 is not longer than `len'. diff --git a/src/key-list.cc b/src/key-list.cc index 8a2f7c2..33c3906 100644 --- a/src/key-list.cc +++ b/src/key-list.cc @@ -833,6 +833,10 @@ Key_List::output_hash_function (void) else if (option[KRC] | option[C] | option[ANSIC]) printf ("#ifdef __GNUC__\n" "__inline\n" + "#else\n" + "#ifdef __cplusplus\n" + "inline\n" + "#endif\n" "#endif\n"); if (option[KRC] | option[C] | option[ANSIC])