Hello, Mateusz, LH_Mouse.
Another point against my patch and Mateusz's patch is that applying
__declspec(selectany) to a declaration is "incorrect" according to MSDN:
https://msdn.microsoft.com/en-us/library/5tkz6s71.aspx
The clang people have some handy notes in their test suite about how clang
W dniu 2017-05-03 o 23:14, Mateusz pisze:
> We could consider define DECLSPEC_SELECTANY to __attribute__((weak)) for old
> GCC.
>
> Patch for this attached.
Sorry for this patch -- it's not working for old GCC.
--
Check
We could consider define DECLSPEC_SELECTANY to __attribute__((weak)) for old
GCC.
Patch for this attached.
W dniu 2017-05-03 o 17:19, David Grayson pisze:
> By the way, it's really not clear to me what specific solution you are
> proposing when you say "ensure each GUID is defined only once" but
On 2017/5/3 23:12, David Grayson wrote:
> When you say "optimal", what are you optimizing for?
>
For decreasing object file sizes and link time, apparently.
> The UsbView code uses that header file in several different translation
> units, so you end up having a bunch of duplicate GUID definitions
By the way, it's really not clear to me what specific solution you are
proposing when you say "ensure each GUID is defined only once" but I'm
imagining it will introduce new incompatibilities/quirks that people have
to worry about when switching between Visual Studio and mingw-w64, because
you woul
>
> > It sounds like guiddef.h should probably check the GCC major version.
> > Based on the tests people have reported in this thread, I would guess
> that
> > for GCC 6 and above the selectany attribute on the declaration is
> required,
> > while on GCC 5 and below the selectany attribute on the
On 2017/5/3 12:46, David Grayson wrote:
> I won't be offended if you revert it.
I reverted it and added a line of comment explaining what had happened.
> I'm not sure what your shell commands do, but as long as there is one GUID
> defined in one header file, and the selectany attribute is not used
I won't be offended if you revert it.
I'm not sure what your shell commands do, but as long as there is one GUID
defined in one header file, and the selectany attribute is not used
properly, you can get multiple definition errors, because that header file
could be used in multiple translation unit
On 2017/5/3 9:33, Liu Hao wrote:
> Kai, should we revert it? We have to deal with the multiple definition
> error thereafter.
>
A number of UUIDs/GUIDs are suffering from such multiple definitions,
which can be discovered using the following commands:
```bash
grep -EhrI '^DEFINE_(GUID|OLEGUID)' |
On 2017/5/3 6:23, Mateusz wrote:
> W dniu 2017-05-02 o 13:08, Liu Hao pisze:
>> On 2017/5/2 18:38, Kai Tietz wrote:
>>> I think, it is worth a try. In general it looks sensible.
>> As you wish.
>
> For GCC 7.1 and 6.3 the patch is OK.
>
> For GCC 5.4 is not -- error compiling ffmpeg:
> CC lib
W dniu 2017-05-02 o 13:08, Liu Hao pisze:
> On 2017/5/2 18:38, Kai Tietz wrote:
>> I think, it is worth a try. In general it looks sensible.
> As you wish.
For GCC 7.1 and 6.3 the patch is OK.
For GCC 5.4 is not -- error compiling ffmpeg:
CC libavdevice/dshow.o
In file included from
f:\msy
On 2017/5/2 18:38, Kai Tietz wrote:
> I think, it is worth a try. In general it looks sensible.
As you wish.
--
Best regards,
LH_Mouse
--
Check out the vibrant tech community on one of the world's most
engaging tech si
I think, it is worth a try. In general it looks sensible.
Kai
2017-05-02 11:56 GMT+02:00 Liu Hao :
> Kai, did you mean this patch was ok for master?
>
> --
> Best regards,
> LH_Mouse
>
>
> --
> Check out the vibrant tech
Kai, did you mean this patch was ok for master?
--
Best regards,
LH_Mouse
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__
If __declspec(selectany) is not used on the prototype but later used on
a definition, GCC seems to ignore it, and you can get
multiple-definition errors at link time.
That situation can arise in code like Microsoft's usbview utility that
has multiple translation units including the following h
15 matches
Mail list logo