delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/13/23:12:16

From: Alain Magloire <alainm AT rcsm DOT ece DOT mcgill DOT ca>
Message-Id: <199908140250.WAA10528@spock2.ECE.McGill.CA>
Subject: Re: Useful version of zippo, DJGPP package manager, now out
To: djgpp-workers AT delorie DOT com
Date: Fri, 13 Aug 1999 22:50:27 -0400 (EDT)
In-Reply-To: <37B4B6DC.6EA7F0EF@tudor21.net> from "Richard Dawe" at Aug 14, 99 01:22:52 am
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Bonjour M. Richard Dawe

> Laurynas Biveinis wrote:
> > also rewrote expression
> > *p = '\0', ret = mkdir(buf, mode), *p = '/';
> > to use ";" instead of ",", because GCC could reorder that
> > expression as it likes and that would result in a big bug.
> 
> Is this really true? I thought that use of the comma operator only let the
> operations occur in the written order.

If a C compiler does not respect the precedence of the comma operator
it is seriously broken.  The comma operator requires to completly
evaluate the first expression before evaluating the second. If not,
semantics like for() will not work e.g.: for (j = i + 2, k = j + 4; ;)

I think, Laurynas, is throwing a punch because she/he doesn't like
the sytle of the expression ;-) then again like him/her I don't see the benefice
of ',' instead of ';' here, unless you have a condition(if,while,..) before
and want the line to be consider as one expression.  I don't have the
full context.

> 
> > Last note - in docs you mentioned that configure script
> > not always finds GCC. You seem to be using autoconf 2.12,
> > I suggest to update to 2.13 and the problem should vanish.
> > Also I added AC_PROG_CC call to configure.in.
> 
> FYI using AC_PROG_CC seems to also fix the problem. You then do not have
> to use 'export CC=$DJDIR/bin/gcc.exe' for the configure script to find all
> the libraries, etc. I haven't tried autoconf 2.13 yet.
> 

configure was finding the compiler because probably you had the
env CC set. Excerpt from autoconf:
 - Macro: AC_PROG_CC
   Determine a C compiler to use.  If `CC' is not already set in the
   environment, check for `gcc', and use `cc' if that's not found.
   Set output variable `CC' to the name of the compiler found.

   If using the GNU C compiler, set shell variable `GCC' to `yes',
   empty otherwise.  If output variable `CFLAGS' was not already set,
   set it to `-g -O2' for the GNU C compiler (`-O2' on systems where
   GCC does not accept `-g'), or `-g' for other compilers.

   If the C compiler being used does not produce executables that can
   run on the system where `configure' is being run, set the shell
   variable `cross_compiling' to `yes', otherwise `no'.  In other
   words, this tests whether the build system type is different from
   the host system type (the target system type is irrelevant to this
   test).  *Note Manual Configuration::, for more on support for
   cross compiling.
									    


-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019