public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/36901] pedwarn() + -pedantic-errors + -w (inhibit_warnings) should not emit errors Date: Sat, 09 Aug 2008 20:40:00 -0000 [thread overview] Message-ID: <20080809203856.13464.qmail@sourceware.org> (raw) In-Reply-To: <bug-36901-13511@http.gcc.gnu.org/bugzilla/> ------- Comment #10 from manu at gcc dot gnu dot org 2008-08-09 20:38 ------- Yeah, silly me, it obviously fails because there is no "next" pr36901.h to include. Since we include limits.h, we are at the mercy of the contents of the limits.h that is found. This isn't very reliable. We just need to a pedantic warning in the header. This works in x86_64, could you test on your side? Index: gcc/testsuite/gcc.dg/pr36901-3.c =================================================================== --- gcc/testsuite/gcc.dg/pr36901-3.c (revision 138906) +++ gcc/testsuite/gcc.dg/pr36901-3.c (working copy) @@ -4,7 +4,6 @@ void foo(void) { int s = sc; } /* { dg-message "file included" "In file included" { target *-*-* } 0 } */ -/* { dg-warning "overflow" "overflow" { target *-*-* } 0 } */ -/* { dg-error "overflow" "overflow" { target *-*-* } 0 } */ +/* { dg-error "ordered comparison of pointer with integer zero" "pedantic error" { target *-*-* } 0 } */ Index: gcc/testsuite/gcc.dg/pr36901-4.c =================================================================== --- gcc/testsuite/gcc.dg/pr36901-4.c (revision 138906) +++ gcc/testsuite/gcc.dg/pr36901-4.c (working copy) @@ -4,8 +4,6 @@ void foo(void) { int s = sc; } /* { dg-message "from " "In file included" { target *-*-* } 0 } */ -/* { dg-warning "overflow" "overflow" { target *-*-* } 0 } */ -/* { dg-error "overflow" "overflow" { target *-*-* } 0 } */ -/* { dg-error "#include_next is a GCC extension" "#include_next" { target *-*-* } 0 } */ +/* { dg-error "ordered comparison of pointer with integer zero" "pedantic error" { target *-*-* } 0 } */ Index: gcc/testsuite/gcc.dg/pr36901.h =================================================================== --- gcc/testsuite/gcc.dg/pr36901.h (revision 138906) +++ gcc/testsuite/gcc.dg/pr36901.h (working copy) @@ -1,2 +1,2 @@ -#include <limits.h> -static int sc = INT_MAX + 1; +int sc = (&sc > 0); + -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36901
next prev parent reply other threads:[~2008-08-09 20:40 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-07-22 16:15 [Bug other/36901] New: " manu at gcc dot gnu dot org 2008-07-22 16:31 ` [Bug other/36901] " manu at gcc dot gnu dot org 2008-07-22 17:30 ` paolo dot carlini at oracle dot com 2008-07-22 18:08 ` manu at gcc dot gnu dot org 2008-08-09 0:00 ` manu at gcc dot gnu dot org 2008-08-09 0:00 ` manu at gcc dot gnu dot org 2008-08-09 17:17 ` eric dot weddington at atmel dot com 2008-08-09 17:17 ` eric dot weddington at atmel dot com 2008-08-09 17:32 ` manu at gcc dot gnu dot org 2008-08-09 19:36 ` eric dot weddington at atmel dot com 2008-08-09 20:40 ` manu at gcc dot gnu dot org [this message] 2008-08-10 3:14 ` eric dot weddington at atmel dot com 2008-08-10 14:50 ` manu at gcc dot gnu dot org 2008-08-10 16:51 ` eric dot weddington at atmel dot com 2008-08-10 18:35 ` manu at gcc dot gnu dot 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=20080809203856.13464.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).