Hi Ronald,

Am 17.10.2016 um 23:45 schrieb Ronald S. Bultje:
> Hi Michael,
> On Mon, Oct 17, 2016 at 5:23 PM, Michael Behrisch <o...@behrisch.de> wrote:
>> Hi Ronald,
>> Am 17.10.2016 um 21:37 schrieb Ronald S. Bultje:
>>> Hi Michael,
>>> On Mon, Oct 17, 2016 at 3:16 PM, Michael Behrisch <o...@behrisch.de>
>>> wrote:
>>>> Am 17.10.2016 um 15:29 schrieb Michael Niedermayer:
>>>>> On Mon, Oct 17, 2016 at 01:34:55PM +0200, wm4 wrote:
>>>>>> On Mon, 17 Oct 2016 13:09:36 +0200 Michael Niedermayer
>>>>>> <mich...@niedermayer.cc> wrote:
>>>>> this is about a cosmetic change having no real technical effect
>>>> So here are my cosmetics for libavutil. It simply helps with
>>>> keeping track of real warnings in downstream projects.
>>> Why are you using -Wpedantic?
>> My main reason is that we are compiling with different compilers for
>> different platforms and -Wpedantic at least promises to keep the code
>> closer to the standard and thus better transferable. I never tested
>> whether this is actually true, but I like the fact that the project
>> currently compiles with gcc, clang and msvc and welcome every tool and
>> option that helps me to keep it this way. See also here:
>> http://stackoverflow.com/questions/2855121/what-is-the-
>> purpose-of-using-pedantic-in-gcc-g-compiler
>>> Most people use warnings as a way for the compiler to inform them of
>>> potential bugs in their code; has -Wpedantic ever helped you find
>>> bugs?
>> I cannot think of any but to be honest I cannot even tell exactly which
>> warnings are enabled by which of the -Wall, -Wextra and -Wpedantic flags
>> and it is surprisingly hard to find out.
> FFmpeg compiles with msvc, clang and gcc (without -Wpedantic), so the logic
> seems a little strange.

I am not claiming that -Wpedantic is the only way to achieve this. I
only think it helps or at least I assume that was the intention when it
was invented. After all, that is one of the reasons why standards exist
(in my opinion), to keep code compiler agnostic such that (in theory) I
do not have to check by myself whether it compiles with all the
compilers out there, as long as it adheres to the standard. And
"-Wpedantic" is just a "standard" checker to me. Maybe it checks for an
outdated version of the standard or for some version which is of no
relevance to FFmpeg, then please tell me.

Best regards,

Attachment: signature.asc
Description: OpenPGP digital signature

ffmpeg-devel mailing list

Reply via email to