Article View: gnu.gcc.bug
Article #6413Conditional operator, comma operator, and null pointer
From: Steve Cornett
Date: Mon, 27 Nov 1995 00:00
Date: Mon, 27 Nov 1995 00:00
17 lines
859 bytes
859 bytes
With gcc 2.7.0, the following program incorrectly causes gcc to emit a
warning message when compiled with "gcc -c test.c".
int f(void);
void g() {
const char * p;
p = 0;
p = ("", 0);
p = 1 ? "" : 0;
p = 1 ? (123, "") : (123, 0);
p = 1 ? (f(), "") : (f(), 0); /* incorrect warning here */
}
Steve Cornett
Bullseye Software
Voice 800-278-4268
Web http://www.bullseye.com
Technical Details
Message-ID:
<199511272246.OAA28223@washington.nwlink.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,4cd5ebe9b7c4c712,start X-Google-Attributes: gid113d02,public From: steve@bullseye.com (Steve Cornett) Subject: Conditional operator, comma operator, and null pointer Date: 1995/11/27 Message-ID: <199511272246.OAA28223@washington.nwlink.com> X-Deja-AN: 120236562 distribution: gnu sender: daemon@cis.ohio-state.edu organization: GNUs Not Usenet newsgroups: gnu.gcc.bug