[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc3.4 warnings
From: |
Stanislav Ievlev |
Subject: |
Re: gcc3.4 warnings |
Date: |
Mon, 17 Jan 2005 17:16:38 +0300 |
On Sat, Jan 15, 2005 at 01:23:41PM -0500, Thomas Dickey wrote:
> On Thu, Jan 13, 2005 at 01:12:01PM +0300, Stanislav Ievlev wrote:
> > On:
> > #define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) |
> > COLOR_PAIR(p)), OK)
> >
> > Compiller warning:
> > right-hand operand of comma has no effect
>
> I'm missing something - a #define by itself shouldn't do that. I have
> gcc 3.4.3 installed for testing, and did notice that it's treating the
> -Wunused stuff differently (not on ncurses though). I don't see it
> producing this warning. Perhaps you're using some warning option that
> I'm not?
There are a little testcase:
--
$ cat l.cc
#include <curses.h>
int main()
{
//int wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);
wattr_set(stdscr,0,0, 0);
}
--
$ gcc -Wall -W -pedantic -c l.cc
l.cc: In function `int main()':
l.cc:6: warning: right-hand operand of comma has no effect
--
gcc --version
i586-alt-linux-gcc (GCC) 3.4.3 20050104 (ALT Linux, build 3.4.3-alt2)
--
>
> --
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net