[Bug c++/11849] New: cast mistaken as declaration
wilson at afn dot org
gcc-bugzilla@gcc.gnu.org
Thu Aug 7 21:25:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11849
Summary: cast mistaken as declaration
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wilson at afn dot org
CC: gcc-bugs at gcc dot gnu dot org
Source (3 lines, bug.cxx):
double rint(double); // Example illustrates utility
unsigned foo((unsigned)rint(3.2)); // This less desirable form works
unsigned bar(unsigned(rint(3.2))); // This equivalent doesn't
G++ whines:
bug.cxx:3: `unsigned int rint' redeclared as different kind of symbol
bug.cxx:1: previous declaration of `double rint(double)'
bug.cxx:3: warning: initialization to `unsigned int' from `double'
bug.cxx:3: warning: argument to `unsigned int' from `double'
More information about the Gcc-bugs
mailing list