| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| content-class: | urn:content-classes:message |
| Subject: | RE: g++ rejects 'timezone tz' |
| MIME-Version: | 1.0 |
| Date: | Mon, 20 Oct 2003 16:12:08 +0200 |
| X-MimeOLE: | Produced By Microsoft Exchange V6.0.6249.0 |
| Message-ID: | <F0D7281DAB048B438E8F5EC4ECEFBDDC174F09@esmail.elsag.de> |
| X-MS-Has-Attach: | |
| X-MS-TNEF-Correlator: | |
| From: | =?iso-8859-1?Q?J=F6rg_Schaible?= <Joerg DOT Schaible AT Elsag-Solutions DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id h9KECb7P024794 |
Alex Vinokur wrote on Monday, October 20, 2003 4:00 PM:
> ===========================================
> Windows 2000 Professional
> CYGWIN_NT-5.0 1.5.4(0.94/3/2)
> GNU g++ version 3.3.1 (cygming special)
> ===========================================
>
> ====== C++ code : File foo.cpp : BEGIN ======
> #include <sys/time.h>
>
> int main()
> {
> struct timeval tv1;
> timeval tv2; // No compilation error
> struct timezone tz1;
> timezone tz2; // Compilation error
>
> return 0;
> }
> ====== C++ code : File foo.cpp : END ========
>
>
> ====== Compilation : BEGIN ======
>
> $ g++ foo.cpp
>
> foo.cpp: In function `int main()':
> foo.cpp:8: error: `timezone' undeclared (first use this function)
> foo.cpp:8: error: (Each undeclared identifier is reported
> only once for each
> function it appears in.)
> foo.cpp:8: error: parse error before `;' token
>
> ====== Compilation : END ========
>
> Question. Why does g++ reject 'timezone tz2'?
I would assume, that a function timezone exists, but no function timeval. Therefore the declaration of tz2 with timezone omitting struct is ambigous ...
Regards,
Jörg
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |