Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.lang.c > #397434
| From | Michael S <already5chosen@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | pedantic gcc and const 2D arrays |
| Date | 2026-04-09 01:21 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <20260409012107.00006dc5@yahoo.com> (permalink) |
IIRC, this is my first on-topic post in comp.lang.c group.
As they say, nobody is perfect.
// pedant_2d.c
int bar(const int a[5][42])
{
return a[0][0];
}
int foo(int x)
{
int a[5][42];
a[0][0] = 1;
return bar(a);
}
// end of pedant_2d.c
$ gcc -std=c17 -pedantic -c pedant_2d.c
pedant_2d.c: In function 'foo':
pedant_2d.c:10:14: warning: invalid use of pointers to arrays with
different qualifiers in ISO C before C23 [-Wpedantic] 10 | return
bar(a); | ^
What does it mean ?
Back to comp.lang.c | Previous | Next — Next in thread | Find similar
pedantic gcc and const 2D arrays Michael S <already5chosen@yahoo.com> - 2026-04-09 01:21 +0300
Re: pedantic gcc and const 2D arrays Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-08 15:57 -0700
Re: pedantic gcc and const 2D arrays Michael S <already5chosen@yahoo.com> - 2026-04-09 03:09 +0300
Re: pedantic gcc and const 2D arrays 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-04-09 02:33 +0200
Re: pedantic gcc and const 2D arrays Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-08 21:42 -0700
Re: pedantic gcc and const 2D arrays Andrey Tarasevich <noone@noone.net> - 2026-04-08 20:34 -0700
Re: pedantic gcc and const 2D arrays Michael S <already5chosen@yahoo.com> - 2026-04-09 11:09 +0300
Re: pedantic gcc and const 2D arrays "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-04-09 02:38 -0700
Re: pedantic gcc and const 2D arrays Michael S <already5chosen@yahoo.com> - 2026-04-09 14:06 +0300
Re: pedantic gcc and const 2D arrays "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-04-09 13:09 -0700
Re: pedantic gcc and const 2D arrays Andrey Tarasevich <noone@noone.net> - 2026-04-12 11:30 -0700
Re: pedantic gcc and const 2D arrays Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-13 05:40 -0700
csiph-web