1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Support for inline when generating C code which will be compiled by a

C++ compiler.
This commit is contained in:
Bruno Haible
2000-08-19 15:54:32 +00:00
parent 84663d7379
commit 4658effb1c
2 changed files with 7 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
2000-08-19 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* 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'.

View File

@@ -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])