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

Reply via email to