List:General Discussion« Previous MessageNext Message »
From:Benjamin Pflugmann Date:May 21 1999 5:52am
Subject:Re: use of "false".
View as plain text  

If I remember correctly, "false" _is_ defined in ANSI C++. As I don't
have a documentation at hand, I cannot tell for sure, but a test run
suggests the same.

> cat
int main(int, char**)
  bool flag = false;

> g++ --ansi --pedantic

runs without errors. (Note that it does not include anything, so
'false' is a recognized keyword.)

If I am right, this would mean that your xlC compiler either is not
standards compatible or you have to switch that on.



On Thu, May 20, 1999 at 05:34:47PM -0700, noyd@stripped wrote:
> >Description:
>    The source file "" has a statement:
> 	return false;
>    This should be instead:
>         return FALSE;
>    The value "FALSE" is defined in global.h.
>    The value "false" is not defined, but is likely present in
>    many OS or development platform include files.
> >How-To-Repeat:
> I encountered this problem using the xlC compiler on AIX 4.2.
> In order to get the "configure" to use "xlC", I did the following:
>   . Set environment variables  CC and CXX.
>   . Changed config.cache to specify "xlC" and "/bin/ld" for the 
>     compiler and loader.  Set flag for using "gcc" to "no".
> The "configure" script does not give the "CC" and "CXX" environment
> variables as much respect as I would expect.  I didn't anticipate I'd
> need to edit the config.cache to get it to heel.
> After configuration, I also appended this to "config.h" in order to
> make xlC happier ("inline" found in net.c and some others):
> #define inline /**/
> I'm still not done with building, I'll modify my and
> continue.
> >Fix:
> Replace all usage in C and C++ source code of
> the constant value "false" with "FALSE".
> >Submitter-Id:	<submitter ID>
> >Originator:	Steven Jones
> >Organization:  University of Washington, Seattle
> >MySQL support: none
> >Synopsis:	Use of "false" instead of "FALSE" in
> >Severity:	non-critical
> >Priority:	low
> >Category:	mysql
> >Class:		sw-bug
> >Release:	mysql-3.22.22 (Source distribution)
> >Environment:
> System: AIX mead1 2 4 000011078200
> Some paths:  /usr/local/bin/perl /bin/make /usr/local/bin/gmake /usr/local/bin/gcc
> /bin/cc
> GCC: Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2/2.7.2/specs
> gcc version 2.7.2
> Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
> Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock
> --with-low-memory --with-mit-threads=yes
> Perl: This is perl, version 5.004_04 built for aix
> ---------------------------------------------------------------------
> Please check "" before
> posting. To request this thread, e-mail mysql-thread3676@stripped
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.

Attachment: [application/pgp-signature]
Thread use of "false".noyd21 May
  • Re: use of "false".Benjamin Pflugmann21 May