[fpc-pascal] H2pas tool vs others, C header translation
Florian Klämpfl
florian at freepascal.org
Wed Aug 23 09:50:57 CEST 2017
Am 22.08.2017 um 15:59 schrieb Martok:
> If your header looks enough like IDL (which is essentially C++ with
> annotations), you may also be able to use one of the available IDL compilers.
> There are a few dialect issues though, so YMMV. I'd say MPFR has a few defines
> too many for my idlproc (https://github.com/martok/idlproc), but may come closer
> for others.
>
> As a heads-up: whatever tool you end up using, make sure you do NOT translate
> the C enums in mpfr.h as enumerations. It will work, but create unpredictable
> codegen on the FPC side.
It is perfectly predictable. Just do not store invalid values in enumeration variables. And invalid
is everything not being declared. This is how FPC works and will work.
More information about the fpc-pascal
mailing list