In the code fragment

  int i = static_cast<const int>(1.234);
  int j = static_cast<volatile int>(1.234);

the const and volatile qualifiers in the cast are silently ignored, even with
-Wall -W -pedantic.  A warning from g++ for this mild infraction would be
useful.


-- 
           Summary: Request for warning where const/volatile is ignored in a
                    cast
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: simon_baldwin at yahoo dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28774

Reply via email to