From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18319 invoked by alias); 20 Feb 2011 13:42:54 -0000 Received: (qmail 18311 invoked by uid 22791); 20 Feb 2011 13:42:54 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Feb 2011 13:42:49 +0000 Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id p1KDgkti012593 for ; Sun, 20 Feb 2011 05:42:47 -0800 Received: from vws20 (vws20.prod.google.com [10.241.21.148]) by kpbe16.cbf.corp.google.com with ESMTP id p1KDgi4x022001 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 20 Feb 2011 05:42:45 -0800 Received: by vws20 with SMTP id 20so1270776vws.35 for ; Sun, 20 Feb 2011 05:42:44 -0800 (PST) Received: by 10.220.178.67 with SMTP id bl3mr66014vcb.1.1298209364622; Sun, 20 Feb 2011 05:42:44 -0800 (PST) Received: from coign.google.com ([72.14.228.1]) by mx.google.com with ESMTPS id w26sm1886765vcf.21.2011.02.20.05.42.43 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Feb 2011 05:42:44 -0800 (PST) From: Ian Lance Taylor To: ali hagigat Cc: gcc-help@gcc.gnu.org Subject: Re: -fcond-mismatch option References: Date: Sun, 20 Feb 2011 13:44:00 -0000 In-Reply-To: (ali hagigat's message of "Sun, 20 Feb 2011 10:23:24 +0330") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00307.txt.bz2 ali hagigat writes: > "-fcond-mismatch > Allow conditional expressions with mismatched types in the second and third > arguments. The value of such an expression is void." > Could any body give an example? What are the second and third > arguments? How they are mismatched? How the conditional expression is > written? Here is an example which gives an error by default but can be compiled if you use -fcond-mismatch. struct s1 { int i; }; extern struct s1 f1(); extern char *f2(); void foo(int f) { f ? f1() : f2(); } Ian