public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11849] New: cast mistaken as declaration
@ 2003-08-07 21:25 wilson at afn dot org
  2003-08-07 21:58 ` [Bug c++/11849] " pinskia at physics dot uc dot edu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: wilson at afn dot org @ 2003-08-07 21:25 UTC (permalink / raw)
  To: gcc-bugs

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'


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-21  1:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-07 21:25 [Bug c++/11849] New: cast mistaken as declaration wilson at afn dot org
2003-08-07 21:58 ` [Bug c++/11849] " pinskia at physics dot uc dot edu
2004-04-21  1:31 ` pinskia at gcc dot gnu dot org
2004-04-21  1:31 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).