Re: Why does 2nd loop only print values 10-19 and not 0-19?

2017-01-21 Thread Andreas Schwab
On Jan 21 2017, L A Walsh wrote: > It may be this should go to "gcc-help", You should be using -Wall. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."

Re: Why does 2nd loop only print values 10-19 and not 0-19?

2017-01-21 Thread L A Walsh
Paul Smith wrote: On Sat, 2017-01-21 at 13:25 -0800, L A Walsh wrote: It may be this should go to "gcc-help", due to my not seeing my error, but Probably better to start there... if it's really a GCC bug you'll be quickly redirected here. for (i==0; i < sizeof(source)/(2*sizeof(sourc

Re: Why does 2nd loop only print values 10-19 and not 0-19?

2017-01-21 Thread Paul Smith
On Sat, 2017-01-21 at 13:25 -0800, L A Walsh wrote: > It may be this should go to "gcc-help", due to my > not seeing my error, but Probably better to start there... if it's really a GCC bug you'll be quickly redirected here. >     for (i==0; i < sizeof(source)/(2*sizeof(source[0])); ++i) {

Why does 2nd loop only print values 10-19 and not 0-19?

2017-01-21 Thread L A Walsh
It may be this should go to "gcc-help", due to my not seeing my error, but gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.9/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info

Memory buffer handling - additional optimization proposal

2017-01-21 Thread daniel
Hi I have checked how gcc treats temporary buffers allocated in different ways (local buffer on stack, malloced locally in function, malloced outside and passed via argument) and found that gcc could do better work there. I have few proposals how to make things better: 1. Introduce __builtin_