public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30695]  New: uint32_t -> uint16_t without warrnings
@ 2007-02-03 17:40 dushistov at mail dot ru
  2007-02-03 20:42 ` [Bug c/30695] " pinskia at gcc dot gnu dot org
  2007-02-03 21:16 ` dushistov at mail dot ru
  0 siblings, 2 replies; 3+ messages in thread
From: dushistov at mail dot ru @ 2007-02-03 17:40 UTC (permalink / raw)
  To: gcc-bugs

$cat gcc-wrap.c
#include <stdint.h>
#include <stdio.h>

int main()
{
        uint32_t a = 1 << 17;
        uint16_t b = a;
        printf("a: %u, b: %u\n", (unsigned)a, (unsigned)b);
        return 0;
}
$gcc -Wall -Wextra -Wconversion -pedantic gcc-wrap.c
no warrnings
$gcc --version
gcc (GCC) 4.1.1
for example:
$icc --version
iccbin (ICC) 9.1 20060706
$icc -Wall gcc-wrap.c 
gcc-wrap.c(7): remark #810: conversion from "uint32_t={unsigned int}" to
"uint16_t={unsigned short}" may lose significant bits
        uint16_t b = a;
                     ^


-- 
           Summary: uint32_t -> uint16_t without warrnings
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dushistov at mail dot ru


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


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

* [Bug c/30695] uint32_t -> uint16_t without warrnings
  2007-02-03 17:40 [Bug c/30695] New: uint32_t -> uint16_t without warrnings dushistov at mail dot ru
@ 2007-02-03 20:42 ` pinskia at gcc dot gnu dot org
  2007-02-03 21:16 ` dushistov at mail dot ru
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-03 20:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-02-03 20:41 -------
I think this has already been fixed on the trunk with the new -Wconversion
behaviors:
http://gcc.gnu.org/wiki/NewWconversion


-- 


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


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

* [Bug c/30695] uint32_t -> uint16_t without warrnings
  2007-02-03 17:40 [Bug c/30695] New: uint32_t -> uint16_t without warrnings dushistov at mail dot ru
  2007-02-03 20:42 ` [Bug c/30695] " pinskia at gcc dot gnu dot org
@ 2007-02-03 21:16 ` dushistov at mail dot ru
  1 sibling, 0 replies; 3+ messages in thread
From: dushistov at mail dot ru @ 2007-02-03 21:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dushistov at mail dot ru  2007-02-03 21:15 -------
(In reply to comment #1)
> I think this has already been fixed on the trunk with the new -Wconversion
> behaviors:
> http://gcc.gnu.org/wiki/NewWconversion
> 

Thaks for reply, 
I hope to see this feature in near future.


-- 

dushistov at mail dot ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-02-03 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-03 17:40 [Bug c/30695] New: uint32_t -> uint16_t without warrnings dushistov at mail dot ru
2007-02-03 20:42 ` [Bug c/30695] " pinskia at gcc dot gnu dot org
2007-02-03 21:16 ` dushistov at mail dot ru

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