public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/27682] float to int conversion doesn't raise invalid exception Date: Fri, 19 May 2006 16:36:00 -0000 [thread overview] Message-ID: <20060519163557.6152.qmail@sourceware.org> (raw) In-Reply-To: <bug-27682-4503@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from joseph at codesourcery dot com 2006-05-19 16:35 ------- Subject: Re: New: float to int conversion doesn't raise invalid exception On Fri, 19 May 2006, janis at gcc dot gnu dot org wrote: > GCC claims to follow C99 Annex F when converting a floating value to an integer It doesn't (in that it doesn't define __STDC_IEC_559__). But it should aim to do so (provided the user doesn't specify options such as -fno-trapping-math in this case). > A possibly-related issue is that this macro is defined in a header file > provided by glibc, not by GCC. That's a bug in the combination of glibc and GCC, requiring cooperation between them to fix. The macro must be defined from the start of the translation unit without any headers needing to be included; the same also applies to __STDC_ISO_10646__ which is definitely a property of the library. My suggested solution is still as at <http://gcc.gnu.org/ml/gcc/2004-05/msg01019.html>: an implicitly included header <stdc-predef.h> that is provided by the library, makes such definitions, *does not include other glibc headers such as features.h* (because the source file may define feature test macros later before it first explicitly includes a system header), and whose absence is silently ignored by the compiler (in order to support older glibc without the header). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27682
next prev parent reply other threads:[~2006-05-19 16:36 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-05-19 16:08 [Bug target/27682] New: " janis at gcc dot gnu dot org 2006-05-19 16:14 ` [Bug target/27682] " janis at gcc dot gnu dot org 2006-05-19 16:22 ` pinskia at gcc dot gnu dot org 2006-05-19 16:36 ` joseph at codesourcery dot com [this message] 2006-05-19 17:25 ` janis at gcc dot gnu dot org 2006-05-29 2:48 ` amodra at bigpond dot net dot au 2006-05-29 2:52 ` amodra at bigpond dot net dot au 2006-05-30 16:59 ` janis at gcc dot gnu dot org 2008-06-24 8:23 ` aldot at gcc dot gnu dot org 2009-01-31 20:16 ` tydeman at tybor dot com 2009-05-14 3:47 ` bje at gcc dot gnu dot org [not found] <bug-27682-4@http.gcc.gnu.org/bugzilla/> 2010-10-05 18:31 ` pinskia at gcc dot gnu.org
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=20060519163557.6152.qmail@sourceware.org \ --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).