public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dushistov at mail dot ru" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/30695] New: uint32_t -> uint16_t without warrnings Date: Sat, 03 Feb 2007 17:40:00 -0000 [thread overview] Message-ID: <bug-30695-13030@http.gcc.gnu.org/bugzilla/> (raw) $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
next reply other threads:[~2007-02-03 17:40 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-02-03 17:40 dushistov at mail dot ru [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-30695-13030@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).