Is there GCC compiler version fixed this kind of false alarm?
If yes, the lesser versions without fix are what I mean *OLD*.


Thanks,
Star
-----Original Message-----
From: Laszlo Ersek [mailto:ler...@redhat.com] 
Sent: Thursday, September 14, 2017 4:17 PM
To: Zeng, Star <star.z...@intel.com>; Ard Biesheuvel <ard.biesheu...@linaro.org>
Cc: Ni, Ruiyu <ruiyu...@intel.com>; Dong, Eric <eric.d...@intel.com>; 
edk2-devel-01 <edk2-devel@lists.01.org>; Gao, Liming <liming....@intel.com>
Subject: Re: [edk2] [PATCH 2/2] MdeModulePkg/UdfDxe: suppress incorrect 
compiler warning in ReadFile()

On 09/14/17 02:42, Zeng, Star wrote:
> Comparing adding workaround in code with suppressing it in *OLD* version 
> GCCs, I prefer the latter personally.

But, how old is old?

The base compiler in RHEL-7 is gcc-4.8. That's what I use every day.

The base compiler in Debian old-old-stable (still supported), is gcc-4.7 (for 
IA32 and X64).

The base compiler in RHEL-6 (still supported) is gcc-4.4. Is that old?

Thanks
Laszlo

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of 
> Ard Biesheuvel
> Sent: Thursday, September 14, 2017 2:52 AM
> To: Laszlo Ersek <ler...@redhat.com>
> Cc: Ni, Ruiyu <ruiyu...@intel.com>; Dong, Eric <eric.d...@intel.com>; 
> edk2-devel-01 <edk2-devel@lists.01.org>; Gao, Liming 
> <liming....@intel.com>; Zeng, Star <star.z...@intel.com>
> Subject: Re: [edk2] [PATCH 2/2] MdeModulePkg/UdfDxe: suppress 
> incorrect compiler warning in ReadFile()
> 
> On 13 September 2017 at 11:49, Laszlo Ersek <ler...@redhat.com> wrote:
>> On 09/13/17 08:43, Zeng, Star wrote:
>>> Beyond the Rb (I do not want to block this patch series), I am curious 
>>> about one question.
>>>
>>> There may be more this kind of workarounds to fix the build failure.
>>> Is it possible to disable the warning (like below example for VS) for 
>>> specific version of GCC for this kind of false alarm?
>>>
>>>
>>> ProcessorBind.h:
>>> #if defined(_MSC_EXTENSIONS)
>>>
>>> ...
>>>
>>> #if _MSC_VER == 1800 || _MSC_VER == 1900
>>>
>>> //
>>> // Disable these warnings for VS2013.
>>> //
>>>
>>> //
>>> // This warning is for potentially uninitialized local variable, and 
>>> it may cause false // positive issues in VS2013 and VS2015 build // 
>>> #pragma warning ( disable : 4701 )
>>>
>>> //
>>> // This warning is for potentially uninitialized local pointer 
>>> variable, and it may cause // false positive issues in VS2013 and
>>> VS2015 build // #pragma warning ( disable : 4703 )
>>>
>>> #endif
>>>
>>> #endif
>>
>> I think starting with gcc-4.6, gcc supports the "diagnostics" pragma, 
>> which can be used to suppress warnings.
>>
>> Unfortunately, there's no pragma to suppress *only* the incorrect 
>> warnings :) So if we set the pragma, we could lose even those 
>> warnings that point out real bugs.
>>
> 
> That applies to the VS case as well. But I think doing this for older GCCs is 
> fine, most EDK2 developers use a newer version anyway, so we will not lose 
> any coverage by doing so.
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to