Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-24 Thread Leif Lindholm
inal Message- > From: devel@edk2.groups.io On Behalf Of Bob Feng via > groups.io > Sent: 24 July 2020 04:56 > To: Leif Lindholm ; devel@edk2.groups.io; af...@apple.com > Cc: Pierre Gondois ; Gao, Liming > ; to...@nuviainc.com > Subject: Re: [edk2-devel] [PATCH V2 1/2] BaseT

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-24 Thread Leif Lindholm
uly 23, 2020 5:33 PM > To: devel@edk2.groups.io; af...@apple.com > Cc: Feng, Bob C ; PierreGondois > ; Gao, Liming ; > to...@nuviainc.com > Subject: Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on > void* pointer arithmetic > > Hi Andrew, > &g

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-24 Thread PierreGondois
2020 2:06 AM > > To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>; Feng, Bob C > > mailto:bob.c.f...@intel.com>> > > Cc: PierreGondois > <mailto:pierre.gond...@arm.com>>; Gao, Liming > <mailto:liming@intel.com>>; to...@nuviainc.co

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-23 Thread Bob Feng
Message- From: Leif Lindholm Sent: Thursday, July 23, 2020 5:33 PM To: devel@edk2.groups.io; af...@apple.com Cc: Feng, Bob C ; PierreGondois ; Gao, Liming ; to...@nuviainc.com Subject: Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic Hi Andrew

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-23 Thread Leif Lindholm
ps.io <mailto:devel@edk2.groups.io>; Feng, Bob C > > mailto:bob.c.f...@intel.com>> > > Cc: PierreGondois mailto:pierre.gond...@arm.com>>; > > Gao, Liming mailto:liming@intel.com>>; > > to...@nuviainc.com <mailto:to...@nuviainc.com>

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-22 Thread Andrew Fish via groups.io
om>>; > Gao, Liming mailto:liming....@intel.com>>; > to...@nuviainc.com <mailto:to...@nuviainc.com> > Subject: Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on > void* pointer arithmetic > > Hi Bob, > > This patch also breaks about h

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-22 Thread Bob Feng
- From: devel@edk2.groups.io On Behalf Of Leif Lindholm Sent: Thursday, July 23, 2020 2:06 AM To: devel@edk2.groups.io; Feng, Bob C Cc: PierreGondois ; Gao, Liming ; to...@nuviainc.com Subject: Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic Hi Bob

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-22 Thread Andrew Fish via groups.io
Leif, I also noticed we would need this flag for clang/Xcode too. ~/work/Compiler>clang -S void.c ~/work/Compiler>clang -S void.c -Wpointer-arith void.c:4:14: warning: arithmetic on a pointer to void is a GNU extension [-Wpointer-arith] return Arg + 1; ~~~ ^ 1 warning generated.

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-22 Thread Leif Lindholm
Hi Bob, This patch also breaks about half of the ARM/AARCH64 platforms in edk2-platforms. I agree it should go in at a later stage, but for now, can we please revert it? Regards, Leif On Mon, Jul 20, 2020 at 04:10:27 +, Bob Feng wrote: > Reviewed-by: Bob Feng > > > -Original Message--

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-19 Thread Bob Feng
Reviewed-by: Bob Feng -Original Message- From: PierreGondois Sent: Tuesday, July 7, 2020 4:35 PM To: devel@edk2.groups.io Cc: Pierre Gondois ; Feng, Bob C ; Gao, Liming ; tomas.pi...@arm.com; n...@arm.com Subject: [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithm

Re: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-16 Thread Yuwei Chen
ubject: [edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on > void* pointer arithmetic > > From: Pierre Gondois > > By default, gcc allows void* pointer arithmetic. > This is a GCC extension. > However: > - the C reference manual states that void* >point

[edk2-devel] [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic

2020-07-07 Thread PierreGondois
From: Pierre Gondois By default, gcc allows void* pointer arithmetic. This is a GCC extension. However: - the C reference manual states that void* pointer "cannot be operands of addition or subtraction operators". Cf s5.3.1 "Generic Pointers"; - Visual studio compiler treat such operat