This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/25493] New: missed warning about possible loss of data during conversion.


unsigned foo(unsigned long long x, unsigned long long y) { return x/y; }
float bar(double x, double y) { return x/y; }

$ g++ -Wall -O2 -c tmp.cpp
<no warnings>

why g++ doesn't warn users like similar to msvc ?
(warning: conversion from 'type1' to 'type2', possible loss of data)


-- 
           Summary: missed warning about possible loss of data during
                    conversion.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net
 GCC build triplet: *
  GCC host triplet: *
GCC target triplet: *


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]