You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Eric Lemings <Er...@roguewave.com> on 2008/03/25 00:29:15 UTC

NEW_OFLOW_SAFE config test

 
Here's an error compiling the NEW_OFLOW_SAFE.cpp config test:

aCC -mt -I. -AA   +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236
+W2261 +W2340 +W240
1 +W2487 +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 +W4284
+W4285 +W4286 +W42
96 +W4297 +W3348  -c
/amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_
SAFE.cpp -o NEW_OFLOW_SAFE.o
"/amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_SA
FE.cpp", line 46:
error #2020: identifier "size_t" is undefined
          void* p = ::operator new (size_t (-1));
                                    ^
 
Shouldn't 'size_t' be replaced with '_RWSTD_SIZE_T'?  Or one of
the standard headers should be included (e.g. <stddef.h>,
<cstddef>)?

Brad.

RE: NEW_OFLOW_SAFE config test

Posted by Farid Zaripov <Fa...@epam.com>.
> -----Original Message-----
> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
> Sent: Tuesday, March 25, 2008 4:42 PM
> To: dev@stdcxx.apache.org
> Subject: Re: NEW_OFLOW_SAFE config test
> 
> Farid Zaripov wrote:
> >   Hmm. The NEW_THROWS.cpp before this change also used 
> size_t without 
> > including the stddef.h:
> > 
> http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/NEW_T
> HROWS.cpp?
> > revision=611451&view=markup&pathrev=634731
> 
> But it included stdio.h, didn't it? And stdio defines size_t.
> No big deal though. we caught it early enough that we can fix 
> it without it having caused any major problems.

  Ok. Let me add the #include <stddef.h> in all config tests where
size_t
type is used for the reliability.

Farid.

Re: NEW_OFLOW_SAFE config test

Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
>> Sent: Tuesday, March 25, 2008 3:46 AM
>> To: dev@stdcxx.apache.org
>> Subject: Re: NEW_OFLOW_SAFE config test
>>
>> Eric Lemings wrote:
>>>  
>>> Here's an error compiling the NEW_OFLOW_SAFE.cpp config test:
>>>
>>> aCC -mt -I. -AA   +w +W392 +W655 +W684 +W818 +W819 +W849 
>> +W2193 +W2236
>>> +W2261 +W2340 +W240
>>> 1 +W2487 +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 
>>> +W4284
>>> +W4285 +W4286 +W42
>>> 96 +W4297 +W3348  -c
>>>
>> /amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_
>>> SAFE.cpp -o NEW_OFLOW_SAFE.o
>>>
>> "/amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_
>>> SA
>>> FE.cpp", line 46:
>>> error #2020: identifier "size_t" is undefined
>>>           void* p = ::operator new (size_t (-1));
>>>                                     ^
>>>  
>>> Shouldn't 'size_t' be replaced with '_RWSTD_SIZE_T'?  Or one of the 
>>> standard headers should be included (e.g. <stddef.h>, <cstddef>)?
>> The latter. This regression was introduced here:
>>    http://svn.apache.org/viewvc?view=rev&revision=634731
> 
>   Hmm. The NEW_THROWS.cpp before this change also used size_t without
> including the stddef.h:
> http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/NEW_THROWS.cpp?
> revision=611451&view=markup&pathrev=634731

But it included stdio.h, didn't it? And stdio defines size_t.
No big deal though. we caught it early enough that we can fix
it without it having caused any major problems.

Martin

RE: NEW_OFLOW_SAFE config test

Posted by Farid Zaripov <Fa...@epam.com>.
> -----Original Message-----
> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
> Sent: Tuesday, March 25, 2008 3:46 AM
> To: dev@stdcxx.apache.org
> Subject: Re: NEW_OFLOW_SAFE config test
> 
> Eric Lemings wrote:
> >  
> > Here's an error compiling the NEW_OFLOW_SAFE.cpp config test:
> > 
> > aCC -mt -I. -AA   +w +W392 +W655 +W684 +W818 +W819 +W849 
> +W2193 +W2236
> > +W2261 +W2340 +W240
> > 1 +W2487 +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 
> > +W4284
> > +W4285 +W4286 +W42
> > 96 +W4297 +W3348  -c
> > 
> /amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_
> > SAFE.cpp -o NEW_OFLOW_SAFE.o
> > 
> "/amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_
> > SA
> > FE.cpp", line 46:
> > error #2020: identifier "size_t" is undefined
> >           void* p = ::operator new (size_t (-1));
> >                                     ^
> >  
> > Shouldn't 'size_t' be replaced with '_RWSTD_SIZE_T'?  Or one of the 
> > standard headers should be included (e.g. <stddef.h>, <cstddef>)?
> 
> The latter. This regression was introduced here:
>    http://svn.apache.org/viewvc?view=rev&revision=634731

  Hmm. The NEW_THROWS.cpp before this change also used size_t without
including the stddef.h:
http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/NEW_THROWS.cpp?
revision=611451&view=markup&pathrev=634731

Farid.

Re: NEW_OFLOW_SAFE config test

Posted by Martin Sebor <se...@roguewave.com>.
Eric Lemings wrote:
>  
> Here's an error compiling the NEW_OFLOW_SAFE.cpp config test:
> 
> aCC -mt -I. -AA   +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236
> +W2261 +W2340 +W240
> 1 +W2487 +W4227 +W4229 +W4231 +W4235 +W4237 +W4249 +W4255 +W4272 +W4284
> +W4285 +W4286 +W42
> 96 +W4297 +W3348  -c
> /amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_
> SAFE.cpp -o NEW_OFLOW_SAFE.o
> "/amd/devco/lemings/work/stdcxx/trunk.gofish/etc/config/src/NEW_OFLOW_SA
> FE.cpp", line 46:
> error #2020: identifier "size_t" is undefined
>           void* p = ::operator new (size_t (-1));
>                                     ^
>  
> Shouldn't 'size_t' be replaced with '_RWSTD_SIZE_T'?  Or one of
> the standard headers should be included (e.g. <stddef.h>,
> <cstddef>)?

The latter. This regression was introduced here:
   http://svn.apache.org/viewvc?view=rev&revision=634731

Good catch! We should add a test checking the expected result of this
(and other config macros) on known platforms.

Martin