[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: Support non-standard extension (call via casted function pointer)



On 01/26/2016 12:39 AM, Andreas Schwab wrote:
> Michael Karcher <debian@mkarcher.dialup.fu-berlin.de> writes:
> 
>> *can't* (forward-)declare a function without fixing the return type.
> 
> What does "fixing the return type" mean in the context of lying to the
> compiler?

I think you are missing the point, Andreas. Absolutely no one is
argueing that the code in question is not valid. The point is, however,
that this type of code does exist in the real world and runs fine
on any architecture except m68k due the fact that we have separate
address and data registers.

Because of this, we are currently unable to bootsrap ghc on m68k
on Debian which is what triggered Michael to write this patch as
it turned out that it's very hard to fix the behavior in ghc as
you can see in [1].

Again, we are not argueing that what ghc produces here is not
covered by the C99 standard (Michael even mentions that in the
ghc bug report). However, in the end, we would like to use gcc
to produce actual code and not just sit there and be pretty and
hence it is absolutely legitimate to ask the question whether gcc
should include a quirk which helps alleviate problems with real
world code.

Thanks,
Adrian

> [1] https://ghc.haskell.org/trac/ghc/ticket/11395

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: