public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53159] New: Missing narrowing check
@ 2012-04-29 14:00 marc.glisse at normalesup dot org
  2012-05-21 17:47 ` [Bug c++/53159] " paolo.carlini at oracle dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: marc.glisse at normalesup dot org @ 2012-04-29 14:00 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53159
           Summary: Missing narrowing check
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


In this example, I get narrowing warnings for a and b but not c.

struct X
{
  constexpr operator int() { return __INT_MAX__; }
};
int f(){ return __INT_MAX__; }

signed char a { __INT_MAX__ };
signed char b { f() };
signed char c { X{} };


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

end of thread, other threads:[~2014-07-11 21:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-29 14:00 [Bug c++/53159] New: Missing narrowing check marc.glisse at normalesup dot org
2012-05-21 17:47 ` [Bug c++/53159] " paolo.carlini at oracle dot com
2012-05-21 20:55 ` paolo.carlini at oracle dot com
2012-05-21 23:44 ` paolo.carlini at oracle dot com
2013-03-22 14:43 ` jakub at gcc dot gnu.org
2013-03-22 18:17 ` paolo.carlini at oracle dot com
2013-03-24 18:15 ` paolo.carlini at oracle dot com
2014-04-22 11:35 ` jakub at gcc dot gnu.org
2014-07-11 21:54 ` paolo at gcc dot gnu.org
2014-07-11 21:55 ` paolo.carlini at oracle dot com

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).