Compile error: function name collisions between port.h and math.h?

mpb mpb.mail at gmail.com
Thu Apr 5 01:26:28 PDT 2007


Anders wrote:

> I haven't run into this issue before, strangely enough...
> But looking at the header file, I can see how it can be.

It is puzzling that no one had this problem before.

expression.c clearly and directly includes math.h before port.h.  So it seems this
problem would always happen.

Instead of undefining macros, I simply changed expression.c to include port.h
*before* math.h.  This allowed me to compile expression.c to expression.dmd.o.

expression.c appears to be the only file than includes both math.h and port.h.

Including math.h before port.h seems to me like a bug worth fixing upstream in DMD
itself, or at least in GDC.  I'm not sure where/how to submit such a bug report.

Thanks!

-mpb


More information about the D.gnu mailing list