[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 Howard Brodale changed: What|Removed |Added Resolution|INVALID |FIXED --- Comment #12 from Howard Brodal

[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 --- Comment #10 from Howard Brodale --- Should we expect to see "as" in the for loop's printf, for arr[0][0]? YES! And, we do when the pointer arithmetic is NOT being done, above. But, something changed arr[0] to "s" only! What did that? Did I

[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 Howard Brodale changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 --- Comment #7 from Howard Brodale --- we get only 's' in a subsequent printf that runs after that "++" statements. >From that next printf "as" should aappear but, it has been changed to only 's', by the "++" operation!

[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 --- Comment #6 from Howard Brodale --- "*++arr[0][0]" is not supposed to change the array arr! It is supposed to take the source, change it for later use and leave the source unchanged! That the way pointer arithmetic works. It never has change

[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 Howard Brodale changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 Howard Brodale changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID

[Bug c/57853] pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57853 --- Comment #1 from Howard Brodale --- gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-

[Bug c/57853] New: pointer arithmetic on arrays

2013-07-08 Thread brodhow at all2easy dot net
Assignee: unassigned at gcc dot gnu.org Reporter: brodhow at all2easy dot net This C code: #include int main() { char *arr [2][3]={{"as","df","ce"},{"me","yu","we"}}; char *arr2 = NULL; puts(*arr[0]);//works fine puts(*arr[1