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:
@@ -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'.
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user