On Tue, 2007-03-27 at 17:13 +0300, Farid Zaripov wrote:
> > -----Original Message-----
> > From: Martin Sebor [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 26, 2007 10:06 PM
> > To: [email protected]
> > Subject: Re: svn commit: r521934 -
> > /incubator/stdcxx/trunk/etc/config/src/STRUCT_TM_IN_WCHAR_H.cpp
> >
> > > 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?
> The compiler do not issue an error if struct is not declared.
>
> Moreover, after that declaration type tm can be used in other
> declarations.
>
> The test below compiled without any errors:
Can we find another way to trigger the error? How about changing
the function to:
tm* foo (tm *arg) { return arg; }
Martin
> -----------------
> struct tm* foo (struct tm* arg)
> {
> return arg;
> }
>
> namespace {
> using ::tm;
> }
> -----------------
>
> Farid.