[vlc-devel] [PATCH 0/6] Fix warnings related to unknown attributes by introducing VLC_ATTR

Jean-Baptiste Kempf jb at videolan.org
Mon Feb 27 03:52:52 CET 2017


Hello,



On Sun, 26 Feb 2017, at 23:32, Filip Roséen wrote:

> Use the information available from *configure* *if* available (i.e.
> when we are building VLC), otherwise fall back to a more easily
> maintainable list of macros where we do not care about the exact
> compiler being used. Instead we would maintain in a way that
> corresponds to the current implementation. #ifdef __GNUC__ would
> unconditionally define the macros to what the *“compiler of our
> dream”* would implement.


If I remember correctly, the issue with that, beside vlc_fixups, that is
done for this, it is not a great idea to have headers that depend on
output of configure and of config.h. (notably for out-of-tree module
building compilation, but there were other cases).


I am quite sure this still exists in vlc_codecs.h, (the very badly named
header), where we must have PACKED, but that should be the only other
one where this exists.


I remember that we had this discussion too, because we use the non-
standard #warning and #error.


But I totally agree on the fact that ifderies depending on compiler
names and versions are really not cool too.
Especially since we have way too many GCC-isms and GNU-isms.

And this is totally relevant since GCC is soon going to be our compiler
only for most distributions of Linux. All the other ones will be using
llvm/clang: indeed, even the Mingw migration to llvm is ongoing.


BR,

--

Jean-Baptiste Kempf -  President

+33 672 704 734

 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170227/53c69b24/attachment.html>


More information about the vlc-devel mailing list