[libdvdnav-devel] By The Way...

Timothy Gu timothygu99 at gmail.com
Mon Jan 19 02:46:40 CET 2015


On Sat Jan 17 2015 at 4:03:48 PM Lawrence D'Oliveiro <
ldo at geek-central.gen.nz> wrote:

> On Thu, 15 Jan 2015 22:36:18 -0800, Timothy Gu wrote:
>
> > gcc_struct is a no-op on Linux, but it changes the ABI to use on
> > Windows.
>
> OK, so how come clang works correctly without recognizing it?
>

I was referring to GCC. Clang just ignores the attribute it doesn't
recognize and throws the warning. On Linux again this doesn't matter. On
Windows it does, but might not be visible to the tester.

Plus even if you are compiling on Windows it might not matter:

1. If the said structures are not exposed and are used internally only
2. If you compile the program and the library using the same compiler.
Clang will still ignore it, and GCC still acknowledges it.
3. If your version of Clang defaults to gcc_struct anyway

When there *is* harm is when say you compile libdvdread with a version of
Clang that defaults to ms_struct (which I think is the status quo as clang
tries to appease more and more MSVC users than GCC users. But I might be
wrong as I don't use clang on windows) and then try to link a program
compiled with gcc against it, or vice versa.

Timothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libdvdnav-devel/attachments/20150119/3f9aa3cf/attachment.html>


More information about the libdvdnav-devel mailing list