stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Pevtsov <ant...@moscow.vdiweb.com>
Subject RE: svn commit: r507360 - in /incubator/stdcxx/trunk/tests: self/0.printf.cpp src/printf.cpp
Date Wed, 14 Feb 2007 16:57:12 GMT
Hi Martin,

I tried to compile the latest tests version on gcc 4.0.2/SUSE Linux 9.1
and got the "duplicate const" error in lines
containing VA_ARG() macro (see below).

The proposed patch is attached (just remove the const qualificator).


With best wishes,
Anton Pevtsov

> From: sebor@apache.org [mailto:sebor@apache.org]
> Sent: Wed, February 14, 2007 2:33 AM
> To: stdcxx-commits@incubator.apache.org
> Subject: svn commit: r507360 - in
> /incubator/stdcxx/trunk/tests: self/0.printf.cpp src/printf.cpp
> 
> Author: sebor
> Date: Tue Feb 13 18:33:40 2007
> New Revision: 507360
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=507360
> Log:
> 2007-02-13  Martin Sebor  <sebor@roguewave.com>
> 
> 	* src/printf.cpp (_rw_fmtnested): New function to handle nested
> 	formatting directives (%{@} et al) extended to format arrays of
> 	values of arbitrary types, including structures.
> 	(VarArgs): New stuct to encapsulate variable arguments and

arrays.

>> 	(VA_ARG): New macro to extract arguments from VarArgs.
>> 	(_rw_fmtinteger, _rw_vasnprintf_ext, _rw_fmtspec): Used VarArgs.
>  
>
[...]


>> @@ -2968,19 +2996,19 @@
>>  
>>      if ('*' == *param) {
>>          // extract the name of the parameter from the argument list
>> -        param = va_arg (*pva, char*);
>> +        param = _RWSTD_CONST_CAST (char*, VA_ARG (*pva, const 
>> + char*));
>>      }
>>  
>>      char* fmtword = 0;
>>  
>>      if ('*' == *word) {
>>          // extract "word" from the argument list
>> -        word = va_arg (*pva, char*);
>> +        word = _RWSTD_CONST_CAST (char*, VA_ARG (*pva, const char*));
>>      }
>  
>
[...]


>> +    if (spec.mod_ext_A == spec.mod) {
>> +        tmparg.kind_       = VarArgs::VA_array;
>> +        tmparg.arg_.pargs_ = VA_ARG (*pva, const void*);
>> +    }
>  
>


Mime
View raw message