From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20660 invoked by alias); 29 Sep 2005 03:19:21 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 20631 invoked by uid 22791); 29 Sep 2005 03:19:11 -0000 Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 29 Sep 2005 03:19:11 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id ; Wed, 28 Sep 2005 23:19:09 -0400 Message-ID: <3518719F06577C4F85DA618E3C37AB910138920C@nimbus.ott.qnx.com> From: Ryan Mansfield To: 'Soujanya Gundlapalli' , gcc-help@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org Subject: RE: Complier not giving warning/error in this scenario.. Please h elp.. Date: Thu, 29 Sep 2005 03:19:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2005-09/txt/msg00205.txt.bz2 No, it's not a problem with the compiler. When you remove the function name, the code is still valid. For example: int main() { int a; a = (1,2,3,4); printf("%d\n", a); } ryan@avarice:~$ gcc t.c ryan@avarice:~$ ./a.out 4 See 6.5.17 Comma operator of the C Standard for more information Regards, Ryan Mansfield -----Original Message----- From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On Behalf Of Soujanya Gundlapalli Sent: Wednesday, September 28, 2005 11:06 PM To: gcc-help@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org Subject: FW: Complier not giving warning/error in this scenario.. Please help.. Hello All, I am trying to compile the file with the following code. Originally it was: if ((erc = pk_val(pline, pkt, mp, PKT_CLEAR, PK_LOCAL)) By accident I saved the file with the following code. if ((erc = (pline, pkt, mp, PKT_CLEAR, PK_LOCAL)) By accident pk_val_call got deleted and when I complied the above code using the options cc -c -g, it got compiled successfully. I tried removing -g also. Even then it gave success. Is this a problem with the compiler? Is there a fix for this that I can use. Appreciate your help. Regards Soujanya