Re: Warning for C Parameter Name Mismatch

2019-03-27 Thread Eric Gallager
On 3/8/19, Joel Sherrill wrote: > Hi > > This may be just an ignorant user question on my part. > > Can gcc report when the parameter name in a C prototype > does not match that used in the implementation? > > int f(int x); > > int f(int y) {...} > > We try to fix every warning gcc reports but thi

Re: Warning for C Parameter Name Mismatch

2019-03-11 Thread Jonathan Wakely
On Sat, 9 Mar 2019 at 17:51, Joel Sherrill wrote: > And not checking system headers is reasonable in general. For RTEMS though, > we are implementing those system headers and do follow the names in the > standards for parameter names in the implementation. Using exactly the names from the standa

Re: Warning for C Parameter Name Mismatch

2019-03-11 Thread Jonathan Wakely
On Sat, 9 Mar 2019 at 17:27, Segher Boessenkool wrote: > > On Sat, Mar 09, 2019 at 08:30:19AM +, Jonathan Wakely wrote: > > On Sat, 9 Mar 2019, 02:23 Eric Gallager, wrote: > > > How would it handle the case where the parameter name is missing > > > entirely from the prototype? I see a lot of

Re: Warning for C Parameter Name Mismatch

2019-03-10 Thread Basile Starynkevitch
On 3/10/19 12:54 PM, David Brown wrote: On 10/03/2019 07:11, Basile Starynkevitch wrote: (I am reading the GCC mailing list in digest mode) On 3/9/19 10:58 PM, gcc-digest-h...@gcc.gnu.org wrote: On Fri, 8 Mar 2019, Joel Sherrill wrote: Can gcc report when the parameter name in a C proto

Re: Warning for C Parameter Name Mismatch

2019-03-10 Thread David Brown
On 10/03/2019 07:11, Basile Starynkevitch wrote: (I am reading the GCC mailing list in digest mode) On 3/9/19 10:58 PM, gcc-digest-h...@gcc.gnu.org wrote: On Fri, 8 Mar 2019, Joel Sherrill wrote: Can gcc report when the parameter name in a C prototype does not match that used in the implem

Re: Warning for C Parameter Name Mismatch

2019-03-09 Thread Basile Starynkevitch
(I am reading the GCC mailing list in digest mode) On 3/9/19 10:58 PM, gcc-digest-h...@gcc.gnu.org wrote: On Fri, 8 Mar 2019, Joel Sherrill wrote: Can gcc report when the parameter name in a C prototype does not match that used in the implementation? int f(int x); int f(int y) {...} I t

Re: Warning for C Parameter Name Mismatch

2019-03-09 Thread Joel Sherrill
On Sat, Mar 9, 2019, 11:27 AM Segher Boessenkool wrote: > On Sat, Mar 09, 2019 at 08:30:19AM +, Jonathan Wakely wrote: > > On Sat, 9 Mar 2019, 02:23 Eric Gallager, wrote: > > > How would it handle the case where the parameter name is missing > > > entirely from the prototype? I see a lot of

Re: Warning for C Parameter Name Mismatch

2019-03-09 Thread Segher Boessenkool
On Sat, Mar 09, 2019 at 08:30:19AM +, Jonathan Wakely wrote: > On Sat, 9 Mar 2019, 02:23 Eric Gallager, wrote: > > How would it handle the case where the parameter name is missing > > entirely from the prototype? I see a lot of header files with their > > prototypes written like that. > > > >

Re: Warning for C Parameter Name Mismatch

2019-03-09 Thread David Brown
On 09/03/2019 03:23, Eric Gallager wrote: On 3/8/19, David Brown wrote: On 09/03/2019 00:06, Joseph Myers wrote: On Fri, 8 Mar 2019, Joel Sherrill wrote: Can gcc report when the parameter name in a C prototype does not match that used in the implementation? int f(int x); int f(int y) {.

Re: Warning for C Parameter Name Mismatch

2019-03-09 Thread Jonathan Wakely
On Sat, 9 Mar 2019, 02:23 Eric Gallager, wrote: > On 3/8/19, David Brown wrote: > > On 09/03/2019 00:06, Joseph Myers wrote: > >> On Fri, 8 Mar 2019, Joel Sherrill wrote: > >> > >>> Can gcc report when the parameter name in a C prototype > >>> does not match that used in the implementation? > >>

Re: Warning for C Parameter Name Mismatch

2019-03-08 Thread Eric Gallager
On 3/8/19, David Brown wrote: > On 09/03/2019 00:06, Joseph Myers wrote: >> On Fri, 8 Mar 2019, Joel Sherrill wrote: >> >>> Can gcc report when the parameter name in a C prototype >>> does not match that used in the implementation? >>> >>> int f(int x); >>> >>> int f(int y) {...} >> >> I think thi

Re: Warning for C Parameter Name Mismatch

2019-03-08 Thread David Brown
On 09/03/2019 00:06, Joseph Myers wrote: On Fri, 8 Mar 2019, Joel Sherrill wrote: Can gcc report when the parameter name in a C prototype does not match that used in the implementation? int f(int x); int f(int y) {...} I think this would be normal and expected - an installed header would us

Re: Warning for C Parameter Name Mismatch

2019-03-08 Thread Joseph Myers
On Fri, 8 Mar 2019, Joel Sherrill wrote: > Can gcc report when the parameter name in a C prototype > does not match that used in the implementation? > > int f(int x); > > int f(int y) {...} I think this would be normal and expected - an installed header would use a reserved-namespace name for

Warning for C Parameter Name Mismatch

2019-03-08 Thread Joel Sherrill
Hi This may be just an ignorant user question on my part. Can gcc report when the parameter name in a C prototype does not match that used in the implementation? int f(int x); int f(int y) {...} We try to fix every warning gcc reports but this is one that gcc doesn't report for us. It could be