incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r521934 - /incubator/stdcxx/trunk/etc/config/src/STRUCT_TM_IN_WCHAR_H.cpp
Date Mon, 26 Mar 2007 19:06:12 GMT
Farid Zaripov wrote:
>> -----Original Message-----
>> From: sebor@apache.org [mailto:sebor@apache.org] 
>> Sent: Saturday, March 24, 2007 1:10 AM
>> To: stdcxx-commits@incubator.apache.org
>> Subject: svn commit: r521934 - 
>> /incubator/stdcxx/trunk/etc/config/src/STRUCT_TM_IN_WCHAR_H.cpp
>>
>> Author: sebor
>> Date: Fri Mar 23 16:09:40 2007
>> New Revision: 521934
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=521934
>> Log:
>> 2007-03-23  Martin Sebor  <sebor@roguewave.com>
>>
> [...]
>>  
>> -struct tm foo (struct tm arg)
>> +// 7.24.1, p2 of C99: struct tm is required to declared // as an 
>> +incomplete type in <wchar.h>
>> +
>> +struct tm* struct_tm_declared (struct tm* arg)
>>  {
>>      return arg;
>>  }
> 
>   The my gcc 3.4.4 on cygwin and msvc treats the declaration of the
> function
> struct_tm_declared as the declaration of the type struct tm also.

I don't understand what you mean. Are you saying the compilers
issue an error for the test cases even when struct tm is declared
or that they do NOT issue an error when the struct is NOT declared?

If the former, can you post the error(s)?

In either case, it would help to have a test case for the compiler
bug (assuming it is, in fact, a bug).

> 
>   I have reopened the issue STDCXX-364.
> 
>   I propose to use using directive for checking the declaration of the
> struct tm:
> 
> namespace {
>     using ::tm;
> }

That relies on namespace support in the compiler which we don't
require (this goes back to the discussion about which compiler
features we should be allowed to assume; IIRC, we never decided
on a list).

Before we change how we test for struct tm I'd like to better
understand the problem with the test as it stands.

Martin

Mime
View raw message