Re: using undeclared function returning bool results in wrong return value

2021-02-22 Thread Jonathan Wakely via Gcc
On Tue, 23 Feb 2021, 01:02 Martin Sebor, wrote: > > So I wonder if changing configure to either implicitly use a command > line option for its tests or set an environment variable to request > a permissive mode might be a way out. > Having a different set of rules for configure scripts is bound

Re: using undeclared function returning bool results in wrong return value

2021-02-22 Thread Martin Sebor via Gcc
On 2/20/21 8:46 AM, David Malcolm via Gcc wrote: On Sat, 2021-02-20 at 15:25 +0100, David Brown wrote: On 19/02/2021 12:18, Jonathan Wakely via Gcc wrote: On Fri, 19 Feb 2021 at 09:42, David Brown wrote: Just to be clear - I am not in any way suggesting that this situation is the fault of any

Re: using undeclared function returning bool results in wrong return value

2021-02-20 Thread David Brown
On 20/02/2021 16:46, David Malcolm wrote: > On Sat, 2021-02-20 at 15:25 +0100, David Brown wrote: > > I think we need to think about both of these use-cases e.g. as we > implement our diagnostics, and that we should mention this distinction > in our UX guidelines... > >> Is it possible to di

Re: using undeclared function returning bool results in wrong return value

2021-02-20 Thread David Malcolm via Gcc
On Sat, 2021-02-20 at 15:25 +0100, David Brown wrote: > On 19/02/2021 12:18, Jonathan Wakely via Gcc wrote: > > On Fri, 19 Feb 2021 at 09:42, David Brown wrote: > > > Just to be clear - I am not in any way suggesting that this > > > situation is > > > the fault of any gcc developers.  If configure

Re: using undeclared function returning bool results in wrong return value

2021-02-20 Thread David Brown
On 19/02/2021 12:18, Jonathan Wakely via Gcc wrote: > On Fri, 19 Feb 2021 at 09:42, David Brown wrote: >> Just to be clear - I am not in any way suggesting that this situation is >> the fault of any gcc developers. If configure scripts are failing >> because they rely on poor C code or inappropria

Re: using undeclared function returning bool results in wrong return value

2021-02-19 Thread Jonathan Wakely via Gcc
On Fri, 19 Feb 2021 at 11:18, Jonathan Wakely wrote: > > On Fri, 19 Feb 2021 at 09:42, David Brown wrote: > > Just to be clear - I am not in any way suggesting that this situation is > > the fault of any gcc developers. If configure scripts are failing > > because they rely on poor C code or inap

Re: using undeclared function returning bool results in wrong return value

2021-02-19 Thread Jonathan Wakely via Gcc
On Fri, 19 Feb 2021 at 09:42, David Brown wrote: > Just to be clear - I am not in any way suggesting that this situation is > the fault of any gcc developers. If configure scripts are failing > because they rely on poor C code or inappropriate use of gcc (code that > requires a particular C standa

Re: using undeclared function returning bool results in wrong return value

2021-02-19 Thread David Brown
On 19/02/2021 09:45, Florian Weimer wrote: * David Brown: On 18/02/2021 13:31, Florian Weimer via Gcc wrote: * Jonathan Wakely via Gcc: Declare your functions. Don't ignore warnings. It's actually a GCC bug that this isn't an error. However, too many configure scripts would still break

Re: using undeclared function returning bool results in wrong return value

2021-02-19 Thread Florian Weimer via Gcc
* David Brown: > On 18/02/2021 13:31, Florian Weimer via Gcc wrote: >> * Jonathan Wakely via Gcc: >> >>> Declare your functions. Don't ignore warnings. >> >> It's actually a GCC bug that this isn't an error. However, too many >> configure scripts would still break if we changed the default. >>

Re: using undeclared function returning bool results in wrong return value

2021-02-18 Thread David Brown
On 18/02/2021 13:31, Florian Weimer via Gcc wrote: > * Jonathan Wakely via Gcc: > >> Declare your functions. Don't ignore warnings. > > It's actually a GCC bug that this isn't an error. However, too many > configure scripts would still break if we changed the default. > People have had 22 year

Re: using undeclared function returning bool results in wrong return value

2021-02-18 Thread Florian Weimer via Gcc
* Jonathan Wakely via Gcc: > Declare your functions. Don't ignore warnings. It's actually a GCC bug that this isn't an error. However, too many configure scripts would still break if we changed the default. So either use -Werror=implicit-function-declaration or C++ for the time being. Thanks,

Re: using undeclared function returning bool results in wrong return value

2021-02-17 Thread Jonathan Wakely via Gcc
On Wed, 17 Feb 2021, 21:12 Thanos Makatos via Gcc, wrote: > I run into a problem that I'm not sure whether it's a bug in my program > (most likely) or something wrong with GCC (highly unlikely, I know, hence > why I haven't sent this to gcc-bugs). This is the wrong list, please use gcc-help fo

Re: using undeclared function returning bool results in wrong return value

2021-02-17 Thread Martin Sebor via Gcc
On 2/17/21 2:05 PM, Thanos Makatos via Gcc wrote: I run into a problem that I'm not sure whether it's a bug in my program (most likely) or something wrong with GCC (highly unlikely, I know, hence why I haven't sent this to gcc-bugs). The problem is using a function that returns a bool, defined

using undeclared function returning bool results in wrong return value

2021-02-17 Thread Thanos Makatos via Gcc
I run into a problem that I'm not sure whether it's a bug in my program (most likely) or something wrong with GCC (highly unlikely, I know, hence why I haven't sent this to gcc-bugs). The problem is using a function that returns a bool, defined in another source file without a declaration, and t