This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: aix4.3 math.h header broken for cabs



>  > Here's an attempt to fix it, by patching gcc/fixinc/inclhack.def. I'd
>  > rather just remove the entire declaration though (how do i do this)...

I believe outright removal to be the best option. I just don't know how 
to do it.

> I have a couple of comments.
> 
> 1.  Outright missing prototypes are usually handled via
> sys-protos.h/fixproto/fix-header rather than fixincl.  Perhaps we
> should add entries to sys-protos.h for all the new c9x functions and
> add a C9X_SYMBOL case to make use of them.

It's not missing. The current use of cabs in math.h by AIX is just wrong:

cabs is C9X for complex absolute value, and should therefore be in 
complex.h, with the correct signature

As a separate issue, I think adding c9x functions to sys-protos.h might 
be nice, if gcc supported them. I don't believe full support is finished 
though...

> What happens if either fixincl or fixproto diddles the non-prototyped
> version to use __complex__ and a user gets that prototype but calls
> the libc function which takes struct dbl_hypot?  We can't assume the
> layout of __complex__ is the same as struct dbl_hypot can we?

(Which is why removing it would be better.)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]