Re: [PATCH] Fix Solaris Workshop Compiler issues

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

 



On Wed, 14 Nov 2007, Junio C Hamano wrote:

Alex Riesen <raa.lkml@xxxxxxxxx> writes:

Guido Ostkamp, Wed, Nov 14, 2007 21:31:13 +0100:
...
cc: acomp failed for diff-delta.c
make: *** [diff-delta.o] Error 2

This is because 'struct delta_index' is declared with no size in delta.h
and with size in diff-delta.c which does not fit.

Huh?! Ever heard of forward declaration?

We are not the first people who pass around a pointer to an opaque struct in the API to hide away the implementation. It would be surprising if the Workshop Compiler chokes on this and not other projects.

You got the original error report from Sun's compiler included in my earlier email. This happens with at least Sun Forte 6.1 (Solaris 8) and Sun Workshop 11 (Solaris 10), IIRC.

The function declarations regarding create_delta() in delta.h and diff-delta.c are identical with respect to the type names of the parameter (only some internal names e.g. like 'buf' vs. 'trg_buf' are slightly different, but this has no effect).

The main difference is that the 'struct delta_index' is opaque in delta.h and non-opaque in diff-delta.c; the patch clearly shows it solves the error. So we've got a solution.

If you feel we could try something else, please let me know and I'll check it out.

Please keep me on CC, as I'm not subscribed to the list, thanks.

Regards

Guido
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux