fix for egcs internal compiler error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -3429,6 +3429,19 @@ bool wxDateTime::IsWorkDay(Country WXUNUSED(country)) const | |||||||
| // wxTimeSpan | // wxTimeSpan | ||||||
| // ============================================================================ | // ============================================================================ | ||||||
|  |  | ||||||
|  | // this enum is only used in wxTimeSpan::Format() below but we can't declare | ||||||
|  | // it locally to the method as it provokes an internal compiler error in egcs | ||||||
|  | // 2.91.60 when building with -O2 | ||||||
|  | enum TimeSpanPart | ||||||
|  | { | ||||||
|  |     Part_Week, | ||||||
|  |     Part_Day, | ||||||
|  |     Part_Hour, | ||||||
|  |     Part_Min, | ||||||
|  |     Part_Sec, | ||||||
|  |     Part_MSec | ||||||
|  | }; | ||||||
|  |  | ||||||
| // not all strftime(3) format specifiers make sense here because, for example, | // not all strftime(3) format specifiers make sense here because, for example, | ||||||
| // a time span doesn't have a year nor a timezone | // a time span doesn't have a year nor a timezone | ||||||
| // | // | ||||||
| @@ -3466,15 +3479,7 @@ wxString wxTimeSpan::Format(const wxChar *format) const | |||||||
|     // should use GetMinutes() % 60, otherwise just GetMinutes() &c |     // should use GetMinutes() % 60, otherwise just GetMinutes() &c | ||||||
|  |  | ||||||
|     // we remember the most important unit found so far |     // we remember the most important unit found so far | ||||||
|     enum TimeSpanPart |     TimeSpanPart partBiggest = Part_MSec; | ||||||
|     { |  | ||||||
|         Part_Week, |  | ||||||
|         Part_Day, |  | ||||||
|         Part_Hour, |  | ||||||
|         Part_Min, |  | ||||||
|         Part_Sec, |  | ||||||
|         Part_MSec |  | ||||||
|     } partBiggest = Part_MSec; |  | ||||||
|  |  | ||||||
|     for ( const wxChar *pch = format; *pch; pch++ ) |     for ( const wxChar *pch = format; *pch; pch++ ) | ||||||
|     { |     { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user