[Bug c/28437] New: multiple fno-builtin-* flags broken

2006-07-19 Thread mike at codeweavers dot com
If more than one -fno-builtin-* flag is specified, the first one is ignored.

I've seen other reports of this on Wine the mailing lists.  We use -fno-builtin
to supress the gcc builtins that are incompatible with msvcrt's string
functions.

[EMAIL PROTECTED]:~/wine$ cat b.c
int iswalpha(unsigned short);
[EMAIL PROTECTED]:~/wine$ gcc -fno-builtin-iswalpha -c b.c
[EMAIL PROTECTED]:~/wine$ gcc -fno-builtin-iswalpha -fno-builtin-iswalnum -c b.c
b.c:1: warning: conflicting types for built-in function ‘iswalpha’

[EMAIL PROTECTED]:~/wine$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20060715 (prerelease) (Debian 4.1.1-9)
[EMAIL PROTECTED]:~/wine$ uname -a
Linux black 2.6.16.11 #1 Mon May 1 16:44:30 KST 2006 x86_64 GNU/Linux


-- 
   Summary: multiple fno-builtin-* flags broken
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mike at codeweavers dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28437



[Bug c/23805] New: No warning for uninitialized variable.

2005-09-09 Thread mike at codeweavers dot com
 

-- 
   Summary: No warning for uninitialized variable.
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mike at codeweavers dot com
CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23805


[Bug c/23805] No warning for uninitialized variable.

2005-09-09 Thread mike at codeweavers dot com

--- Additional Comments From mike at codeweavers dot com  2005-09-10 02:04 
---


char *foo(char **x) { if(*x) return x[0]; return 0; }
char *bar(void) { char *x, *y = 0; if(x) y = foo(&x); return y; }

/usr/local/gcc-4.0.1/bin/gcc -Wall -O2 -Wuninitialized -c tg.c

Give no warnings at all, even though x is used without initialization.

bash-3.00$ /usr/local/gcc-4.0.1/bin/gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.1/configure --prefix=/usr/local/gcc-4.0.1
--with-gnu-ld=/usr/local/binutils-2.16.1/bin/ld
--with-gnu-as=/usr/local/binutils-2.16.1/bin/as
Thread model: posix
gcc version 4.0.1

bash-3.00$ uname -a
Linux black 2.6.13 #4 Mon Aug 29 12:35:27 KST 2005 i686 unknown unknown 
GNU/Linux

Slackware current, built gcc 4.0 myself to check gcc 4.0 warnings in Wine.


-- 
   What|Removed |Added

Version|4.1.0   |4.0.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23805


[Bug middle-end/19430] Missing uninitialized warning

2005-09-10 Thread mike at codeweavers dot com

--- Additional Comments From mike at codeweavers dot com  2005-09-10 08:07 
---

Simplifying things a bit:

void foo(int*);
void bar(void) { int x; if(x) foo(&x); }

gcc -c foo.c -Wall -O2 -Wuninitialized

(More stunning silence.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19430


[Bug c/25955] New: regression: value computed not used warning with cast return value

2006-01-24 Thread mike at codeweavers dot com
bash-3.00$ cat z1.c 
int foo(void);
void bar(void) { (unsigned int)foo(); }
bash-3.00$ vi z1.c 
bash-3.00$ /usr/local/gcc-4.1-branch/bin/gcc -c z1.c -Wall -O2
z1.c: In function ‘bar’:
z1.c:1: warning: value computed is not used

bash-3.00$ /usr/local/gcc-4.1-branch/bin/gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gcc-4.1-branch
--with-gnu-ld=/usr/local/binutils-2.16.1/bin/ld
--with-gnu-as=/usr/local/binutils-2.16.1/bin/as
Thread model: posix
gcc version 4.1.0 20060118 (prerelease)

Background:

Wine's windowsx.h defines:

#define ListBox_SetCurSel(hwndCtl, index) \
((int)SendMessage((hwndCtl), LB_SETCURSEL, (WPARAM)(int)(index), 0L))

Using this macro will give a warning in the gcc 4.1 branch, but not with gcc
4.0.2.  Though the warning is technically correct, it doesn't really make much
sense, and I can't think of a real problem it's going to catch.


-- 
   Summary: regression: value computed not used warning with cast
return value
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: mike at codeweavers dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i486-slackware-linux
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25955



[Bug middle-end/24900] [4.1 Regression] new "value computed is not used" warning in gcc 4.1

2006-01-25 Thread mike at codeweavers dot com


--- Comment #11 from mike at codeweavers dot com  2006-01-26 03:02 ---
Unfortunately statement expressions don't look like portable C.
The (windowsx.h) macros we use in Wine are Windows macros and can't be changed.
To get rid of these warnings it's likely we'll have to turn off the computed
value not used warning, which used to show some useful warnings...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24900



[Bug middle-end/19430] Missing uninitialized warning

2006-03-10 Thread mike at codeweavers dot com


--- Comment #10 from mike at codeweavers dot com  2006-03-10 15:37 ---
Can I bribe you to work on it by fixing a Wine bug in exchange? :)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19430



[Bug c/29827] New: Assigning function with a char param emits a spurious warning

2006-11-14 Thread mike at codeweavers dot com
Assigning a function pointer with a char parameter to a pointer with an
undefined list causes gcc to emit a warning.

[EMAIL PROTECTED]:~/ntnative/loader$ cat x.c
void foo(char);
void (*f1)() = foo;

void bar(int);
void (*f2)() = bar;
[EMAIL PROTECTED]:~/ntnative/loader$ gcc -c x.c
x.c:2: warning: initialization from incompatible pointer type
[EMAIL PROTECTED]:~/ntnative/loader$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)


-- 
   Summary: Assigning function with a char param emits a spurious
warning
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mike at codeweavers dot com
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29827