[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc3.4 warnings
From: |
Eungkyu Song |
Subject: |
Re: gcc3.4 warnings |
Date: |
Mon, 17 Jan 2005 23:47:16 +0900 |
User-agent: |
Mutt/1.5.6+20040907i |
On Mon, Jan 17, 2005 at 05:16:38PM +0300, Stanislav Ievlev wrote:
> From: Stanislav Ievlev <address@hidden>
> Date: Mon, 17 Jan 2005 17:16:38 +0300
> Subject: Re: gcc3.4 warnings
> To: Thomas Dickey <address@hidden>
> Cc: address@hidden
> List-Id: "Bug reports for ncurses,
> the GNU implementation of curses" <bug-ncurses.gnu.org>
> X-Bogosity: Ham, tests=bogofilter, spamicity=0.239855, version=0.93.1
>
> On Sat, Jan 15, 2005 at 01:23:41PM -0500, Thomas Dickey wrote:
> 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)
> --
try l.c not l.cc
I have no idea if you are in C++ environment.
$ cat l.c
#include <curses.h>
int main()
{
wattr_set(stdscr,0,0, 0);
}
$ diff l.c l.cc
$ gcc-3.4 -Wall -std=c99 -W -pedantic -c l.c
$ gcc-3.4 -Wall -std=c++98 -W -pedantic -c l.cc
l.cc: In function `int main()':
l.cc:5: warning: right-hand operand of comma has no effect
$
--
___ _ Division of CS, Dept. of EECS in KAIST
| __| _ _ _ __ _| |___ _ _ _ Member of SPARCS
| _| || | ' `/ _` | / / || | || | http://sparcs.kaist.ac.kr/~eungkyu/
|___`_,_|_||_`__, |_`_``_, |`_,_| @sparcs.kaist.ac.kr
|___/ |__/