Print

Print


On my primary devbox I use:

]==> gcc --version
gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1

And don't see any issue like this. In any case, I don't see anything 
wrong with this particular piece of code. It looks like gcc is 
overzealous, it would not be the first time.

I'd suggest exporting:

CXXFLAGS=-Wno-array-bounds

to work around this.

Cheers,
    Lukasz



On 19.06.2014 09:40, Fabrizio Furano wrote:
> Hi,
>
>   I have the same error in Ubuntu with gcc 4.8.1 ... I just patched it
> locally in order to
> avoid confusing the compiler.
>
> f
>
>
>
> On 06/18/2014 07:37 PM, Adrian Sevcenco wrote:
>> On 06/18/2014 07:48 PM, Lukasz Janyst wrote:
>>> Hi Adrian,
>> Hi Lukasz!
>>
>>>     we build RPMs in TeamCity for this platform and they seem to
>>> build fine:
>>>
>>>
>>> https://teamcity-dss.cern.ch:8443/viewType.html?buildTypeId=XRootD_XRootDFedoraStable40x
>>>
>>>
>>>
>>>   What compiler version is this exactly? Can you please run with
>> gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC)
>>
>>> VERBOSE=1 so that we could see the exact commandline?
>> [ 72%] Building CXX object
>> src/CMakeFiles/XrdXrootd.dir/XrdXrootd/XrdXrootdJob.cc.o
>>
>> cd /home/physics-tools/heplibs/xrootd-4.0.0/BUILD/src &&
>> /usr/lib64/ccache/c++   -DHAVE_ATOMICS -DHAVE_CRYPT -DHAVE_ET_COM_ERR_H
>> -DHAVE_FSTATAT -DHAVE_FUSE -DHAVE_GETHBYXR -DHAVE_GETIFADDRS
>> -DHAVE_LIBEVENT -DHAVE_LIBZ -DHAVE_NAMEINFO -DHAVE_PROTOR
>> -DHAVE_READLINE -DHAVE_SENDFILE -DHAVE_SETRESUID -DHAVE_SHADOWPW
>> -DHAVE_SIGWTI -DHAVE_SSL -DHAVE_XRDCRYPTO -DXrdXrootd_EXPORTS
>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
>> -D__linux__=1 -Wall -Wextra -Werror -Wno-unused-parameter -O3 -DNDEBUG
>> -fPIC -I/home/physics-tools/heplibs/xrootd-4.0.0-src/src/..
>> -I/home/physics-tools/heplibs/xrootd-4.0.0-src/src/.
>> -I/home/physics-tools/heplibs/xrootd-4.0.0-src/src
>> -I/home/physics-tools/heplibs/xrootd-4.0.0/BUILD/src
>> -I/usr/local/include    -o
>> CMakeFiles/XrdXrootd.dir/XrdXrootd/XrdXrootdJob.cc.o -c
>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc
>>
>>
>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc:
>>
>> In member function ‘void XrdXrootdJob2Do::delClient(XrdXrootdResponse*)’:
>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd
>>
>> /XrdXrootdJob.cc:261:69: error: array subscript is above array bounds
>> [-Werror=array-bounds]
>>             {for (j = i+1; j < numClients; j++) Client[i++] = Client[j];
>>                                                                       ^
>>
>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc:
>>
>> In member function ‘int XrdXrootdJob2Do::verClient(int)’:
>>
>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc:327:71:
>>
>> error: array subscript is above array bounds [-Werror=array-bounds]
>>              for (j = i+1; j < numClients; j++,k++) Client[k] =
>> Client[j];
>>                                                                         ^
>> cc1plus: all warnings being treated as errors
>> make[2]: *** [src/CMakeFiles/XrdXrootd.dir/XrdXrootd/XrdXrootdJob.cc.o]
>> Error 1
>> make[2]: Leaving directory
>> `/home/physics-tools/heplibs/xrootd-4.0.0/BUILD'
>> make[1]: *** [src/CMakeFiles/XrdXrootd.dir/all] Error 2
>> make[1]: Leaving directory
>> `/home/physics-tools/heplibs/xrootd-4.0.0/BUILD'
>> make: *** [all] Error 2
>>
>> Thanks!
>> Adrian
>>
>>
>>>
>>> Cheers,
>>>     Lukasz
>>>
>>> ps. please report this kind of stuff via github
>>>
>>> On 18.06.2014 18:44, Adrian Sevcenco wrote:
>>>> Hi! I just tried to compile the 4.0.0 (fedora 20 x86_64) and i got
>>>> this:
>>>>
>>>> [ 70%] Building CXX object
>>>> src/CMakeFiles/XrdXrootd.dir/XrdXrootd/XrdXrootdJob.cc.o
>>>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc:
>>>>
>>>>
>>>> In member function ‘void
>>>> XrdXrootdJob2Do::delClient(XrdXrootdResponse*)’:
>>>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc:261:69:
>>>>
>>>>
>>>> error: array subscript is above array bounds [-Werror=array-bounds]
>>>>              {for (j = i+1; j < numClients; j++) Client[i++] =
>>>> Client[j];
>>>>
>>>> ^
>>>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc:
>>>>
>>>>
>>>> In member function ‘int XrdXrootdJob2Do::verClient(int)’:
>>>> /home/physics-tools/heplibs/xrootd-4.0.0-src/src/XrdXrootd/XrdXrootdJob.cc:327:71:
>>>>
>>>>
>>>> error: array subscript is above array bounds [-Werror=array-bounds]
>>>>               for (j = i+1; j < numClients; j++,k++) Client[k] =
>>>> Client[j];
>>>>
>>>> ^
>>>> cc1plus: all warnings being treated as errors
>>>> make[2]: *** [src/CMakeFiles/XrdXrootd.dir/XrdXrootd/XrdXrootdJob.cc.o]
>>>> Error 1
>>>> make[1]: *** [src/CMakeFiles/XrdXrootd.dir/all] Error 2
>>>> make: *** [all] Error 2
>>>>
>>>> Thanks!
>>>> Adrian
>>>>
>>>>
>>>>
>>>> ########################################################################
>>>>
>>>> Use REPLY-ALL to reply to list
>>>>
>>>> To unsubscribe from the XROOTD-L list, click the following link:
>>>> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1
>>>>
>>>
>>
>>
>>
>> ########################################################################
>> Use REPLY-ALL to reply to list
>>
>> To unsubscribe from the XROOTD-L list, click the following link:
>> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1
>>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1