Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-03-30 Thread Manuel López-Ibáñez
Done! On 30 March 2015 at 23:23, Martin Uecker wrote: > > Hi Manuel, > > sorry for the late reply, I was travelling last week. > My account name is: MartinUecker > > Martin > > > Manuel López-Ibáñez : > >> Martin, >> >> did you manage to create a wiki account? >> >> I can add you to the editors g

Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-03-30 Thread Martin Uecker
Hi Manuel, sorry for the late reply, I was travelling last week. My account name is: MartinUecker Martin Manuel López-Ibáñez : > Martin, > > did you manage to create a wiki account? > > I can add you to the editors group then. > > On 27 January 2015 at 22:54, Martin Uecker wrote: > > Am T

Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-03-18 Thread Manuel López-Ibáñez
Martin, did you manage to create a wiki account? I can add you to the editors group then. On 27 January 2015 at 22:54, Martin Uecker wrote: > Am Tue, 27 Jan 2015 15:15:08 -0500 > "Frank Ch. Eigler" : > >> Hi - >> >> > > thank you, I tried creating an account, but it said: Unknown action >> > >

Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-01-27 Thread Martin Uecker
Am Tue, 27 Jan 2015 15:15:08 -0500 "Frank Ch. Eigler" : > Hi - > > > > thank you, I tried creating an account, but it said: Unknown action > > > newaccount. > > Frank, do you know what the problem might be? > > Yes, this facility was temporarily disabled, as a load-shedding > measure. I'll tur

Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-01-27 Thread Frank Ch. Eigler
Hi - > > thank you, I tried creating an account, but it said: Unknown action > > newaccount. > Frank, do you know what the problem might be? Yes, this facility was temporarily disabled, as a load-shedding measure. I'll turn it back on for a few hours. - FChE

Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-01-27 Thread Manuel López-Ibáñez
On 27 January 2015 at 18:31, Martin Uecker wrote: > > > Manuel López-Ibáñez : > >> On 26 January 2015 at 19:15, Martin Uecker wrote: >> > >> > Since my patch to change this has been accepted, could you please >> > update the FAQ again? >> >> Done. Moreover, if you create a wiki account, I will gr

Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-01-27 Thread Martin Uecker
Manuel López-Ibáñez : > On 26 January 2015 at 19:15, Martin Uecker wrote: > > > > Since my patch to change this has been accepted, could you please > > update the FAQ again? > > Done. Moreover, if you create a wiki account, I will grant you editing powers. thank you, I tried creating an accou

Re: [website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-01-26 Thread Manuel López-Ibáñez
On 26 January 2015 at 19:15, Martin Uecker wrote: > > Since my patch to change this has been accepted, could you please > update the FAQ again? Done. Moreover, if you create a wiki account, I will grant you editing powers. > Also, I think the change could be mentioned here: > > https://gcc.gnu.o

[website, changes] (was: Re: warning about const multidimensional array as function parameter)

2015-01-26 Thread Martin Uecker
Manuel López-Ibáñez : > On 14 October 2014 01:12, Martin Uecker wrote: > > Converting a pointer to an array to a pointer to a constant array > > is safe. Converting a pointer to a pointer to a pointer to a pointer > > to a constant is not (as the CFAQ points out). > > You are probably right tha

Re: [PATCH] warning about const multidimensional array as function parameter

2014-10-28 Thread Martin Uecker
Hi, attached is a revised and extended patch. Changes with respect to the previous patch are: - warn if qualifiers are lost for pointers to multi-dimensional arrays - warn if qualifiers are lost when converting to void* - warnings for _Atomic are preserved - qualifiers are not lost in condit

Re: [PATCH] warning about const multidimensional array as function parameter

2014-10-27 Thread Joseph S. Myers
On Mon, 27 Oct 2014, Martin Uecker wrote: > 3.9.3(5) ... > Cv-qualifiers applied to an array type attach to the > underlying element type, so the notation "cv T," where > T is an array type, refers to an array whose elements > are so-qualified. Such array types can be said to be > more (or less) c

Re: [PATCH] warning about const multidimensional array as function parameter

2014-10-27 Thread Martin Uecker
Jonathan Wakely : > On 27 October 2014 13:10, Joseph S. Myers wrote: > > On Sat, 25 Oct 2014, Martin Uecker wrote: > > > >> Strictly speaking the C standard considers such pointers to be > >> incompatible. This seems to be an unintentional consequence > >> of how qualifiers are always attached to

Re: [PATCH] warning about const multidimensional array as function parameter

2014-10-27 Thread Jonathan Wakely
On 27 October 2014 13:10, Joseph S. Myers wrote: > On Sat, 25 Oct 2014, Martin Uecker wrote: > >> Strictly speaking the C standard considers such pointers to be >> incompatible. This seems to be an unintentional consequence >> of how qualifiers are always attached to the element type. >> (I am tryi

Re: [PATCH] warning about const multidimensional array as function parameter

2014-10-27 Thread Joseph S. Myers
On Sat, 25 Oct 2014, Martin Uecker wrote: > Strictly speaking the C standard considers such pointers to be > incompatible. This seems to be an unintentional consequence > of how qualifiers are always attached to the element type. > (I am trying to get the standard revised too.) The new > behavi

[PATCH] warning about const multidimensional array as function parameter

2014-10-25 Thread Martin Uecker
This patch implements a new proposed behaviour of diagnostics for pointers to arrays with qualifiers in C: - No warning about 'incompatible pointer types' for pointers to arrays with different qualifiers. - Instead, there is a new warning activated only with '-pedantic': "pointers to ar

Re: warning about const multidimensional array as function parameter

2014-10-13 Thread Martin Uecker
Manuel López-Ibáñez : > On 14 October 2014 01:12, Martin Uecker wrote: > > Converting a pointer to an array to a pointer to a constant array > > is safe. Converting a pointer to a pointer to a pointer to a pointer > > to a constant is not (as the CFAQ points out). > > You are probably right that

Re: warning about const multidimensional array as function parameter

2014-10-13 Thread Manuel López-Ibáñez
On 14 October 2014 01:12, Martin Uecker wrote: > Converting a pointer to an array to a pointer to a constant array > is safe. Converting a pointer to a pointer to a pointer to a pointer > to a constant is not (as the CFAQ points out). You are probably right that it is safe. Unfortunately, C consi

Re: warning about const multidimensional array as function parameter

2014-10-13 Thread Martin Uecker
Am Tue, 14 Oct 2014 00:05:47 +0100 Jonathan Wakely : > On 14 October 2014 00:01, Martin Uecker wrote: > > Manuel López-Ibáñez : > > > > Thank you for your quick response. > > > >> > Could we have an option to turn these warnings off? > >> > >> This will be controlled by a new option in GCC 5.0. >

Re: warning about const multidimensional array as function parameter

2014-10-13 Thread Martin Uecker
Manuel López-Ibáñez : > > Could we have an option to turn these warnings off? > > This will be controlled by a new option in GCC 5.0. > > For the details and the answer to your other questions, see > https://gcc.gnu.org/wiki/FAQ#constmismatch > > (If others have comments that are not covered in

Re: warning about const multidimensional array as function parameter

2014-10-13 Thread Jonathan Wakely
On 14 October 2014 00:01, Martin Uecker wrote: > Manuel López-Ibáñez : > > Thank you for your quick response. > >> > Could we have an option to turn these warnings off? >> >> This will be controlled by a new option in GCC 5.0. >> >> For the details and the answer to your other questions, see >> htt

Re: warning about const multidimensional array as function parameter

2014-10-13 Thread Martin Uecker
Manuel López-Ibáñez : Thank you for your quick response. > > Could we have an option to turn these warnings off? > > This will be controlled by a new option in GCC 5.0. > > For the details and the answer to your other questions, see > https://gcc.gnu.org/wiki/FAQ#constmismatch The option '-Win

RE: warning about const multidimensional array as function parameter

2014-10-13 Thread Manuel López-Ibáñez
> Could we have an option to turn these warnings off? This will be controlled by a new option in GCC 5.0. For the details and the answer to your other questions, see https://gcc.gnu.org/wiki/FAQ#constmismatch (If others have comments that are not covered in the FAQ, or believe the answer there c

warning about const multidimensional array as function parameter

2014-10-13 Thread Martin Uecker
Hi all, although this is a problem of the C standard, I still find it annoying that the following code produces warnings about incompatible pointer types (this has been discussed before, see below): extern void test(const double x[2][2]); void foo(void) { double x[2][2]; const