Ticket #6980 (closed defect: fixed)

Bug contains 2 commit(s) | SVN Diffs for #6980

 

Opened 10 months ago

Last modified 9 months ago

smpdtfmt.h, serious compiler warning

Reported by: andy Assigned to: andy
Priority: assess Milestone: 4.2.1
Component: formatting Version:
Keywords: Cc:
Load: Xref:
Java Version: Operating System:
Project (C/J): ICU4C Weeks:
Review: emmons

Description

There's a problem in class SimpleDateFormat that is detected by gcc 4.3.1. This is a C++ language oddity - trying to introduce a new overload of a base class member function in a derived class will hide the base class function, even though the function parameters are of different types.

function 
   SimpleDateFormat::getNumberFormat(UDateFormatField index) const
hides the base class fuction
   DateFormat::getNumberFormat() const
In file included from third_party/icu/source/i18n/simpletz.cpp:30:
./third_party/icu/include/unicode/datefmt.h:537: error: 'virtual const icu_4_2::NumberFormat* icu_4_2::DateFormat::getNumberFormat() const' was hidden
./third_party/icu/include/unicode/smpdtfmt.h:950: error:   by 'virtual const icu_4_2::NumberFormat* icu_4_2::SimpleDateFormat::getNumberFormat(UDateFormatField) const'
ERROR: /home/aheninger/g4d/google3/third_party/icu/source/i18n/BUILD:18:1: C++ compilation of rule '//third_party/icu/source/i18n:icui18n' failed (Exit 1).

Fixing this might be a candidate for ICU 4.2.1

Attachments

Change History

06/03/09 12:10:14 changed by yoshito

  • owner changed from somebody to andy.
  • revw set to emmons.
  • milestone changed from UNSCH to 4.2.1.

06/24/09 11:40:04 changed by emmons

  • status changed from new to closed.
  • resolution set to fixed.

Add/Change #6980 (smpdtfmt.h, serious compiler warning)




Anti spam check: