Re: Ordering of "-I" flags in CPPFLAGS can lead to gnulib headers being skipped

2012-02-23 Thread Bruno Haible
Paul Eggert wrote: > On 02/23/2012 02:08 AM, Michael Goffioul wrote: > > 2) in liboctave/Makefile.am, @CPPFLAGS@ should be moved to the end, or > > after "-I../libgnu" > > That's what I'd do. I would even remove @CPPFLAGS@ from the definiton of AM_CPPFLAGS. When you look at the Automake generated

Re: prohibit_strcmp

2012-02-23 Thread Bruno Haible
Hi Jim, > That gnulib has two definitions is unfortunate, but I will not > volunteer to change the STREQ that I've been using ;-) > I don't see much value in streq.h, either, and hence, don't use it. The value of streq.h is an optimized definition which is used in a few places. I agree that your

Re: Ordering of "-I" flags in CPPFLAGS can lead to gnulib headers being skipped

2012-02-23 Thread John W. Eaton
On 23-Feb-2012, Paul Eggert wrote: | On 02/23/2012 02:08 AM, Michael Goffioul wrote: | > 2) in liboctave/Makefile.am, @CPPFLAGS@ should be moved to the end, or | > after "-I../libgnu" | | That's what I'd do. Seems reasonable to me. I'm not sure why I put @CPPFLAGS@ first. I'll make this change.

Re: prohibit_strcmp

2012-02-23 Thread Akim Demaille
Le 23 févr. 2012 à 17:52, Jim Meyering a écrit : Hi Jim! > Akim Demaille wrote: >> So maybe this warning refers to another kind of STREQ/NEQ? Such as: >> >> fnmatch.c:# define STREQ(s1, s2) (strcmp (s1, s2) == 0) >> fnmatch.c: (STREQ (string, "alpha") || STREQ (string, "upper") \ >> fnmatch.c:

Re: prohibit_strcmp

2012-02-23 Thread Jim Meyering
Akim Demaille wrote: > Also, FWIW, in Bison there are many more strcmp, but they do not > conform to the sc pattern. > > src/ielr.c:if (0 == strcmp (type, "lalr")) > src/ielr.c:else if (0 == strcmp (type, "ielr")) > src/ielr.c:else if (0 == strcmp (type, "canonical-lr")) How about thi

Re: prohibit_strcmp

2012-02-23 Thread Akim Demaille
Also, FWIW, in Bison there are many more strcmp, but they do not conform to the sc pattern. src/ielr.c:if (0 == strcmp (type, "lalr")) src/ielr.c:else if (0 == strcmp (type, "ielr")) src/ielr.c:else if (0 == strcmp (type, "canonical-lr"))

Re: prohibit_strcmp

2012-02-23 Thread Jim Meyering
Akim Demaille wrote: > Bison features some warnings from syntax-check: > > prohibit_strcmp > ../../doc/bison.texinfo:2572:if (strcmp (ptr->name,sym_name) == 0) > ../../src/files.c:145: if (strcmp (ext, ".y") == 0) > ../../src/muscle-tab.c:53: return strcmp (m1->key, m2->key) == 0; > ../../src

prohibit_strcmp

2012-02-23 Thread Akim Demaille
Hi! Bison features some warnings from syntax-check: prohibit_strcmp ../../doc/bison.texinfo:2572:if (strcmp (ptr->name,sym_name) == 0) ../../src/files.c:145: if (strcmp (ext, ".y") == 0) ../../src/muscle-tab.c:53: return strcmp (m1->key, m2->key) == 0; ../../src/muscle-tab.c:410:if (!st

Re: Ordering of "-I" flags in CPPFLAGS can lead to gnulib headers being skipped

2012-02-23 Thread Paul Eggert
On 02/23/2012 02:08 AM, Michael Goffioul wrote: > 2) in liboctave/Makefile.am, @CPPFLAGS@ should be moved to the end, or > after "-I../libgnu" That's what I'd do.

Re: MSVC fails to compile floor.c with -fp:strict

2012-02-23 Thread Michael Goffioul
On Thu, Feb 23, 2012 at 10:12 AM, Bruno Haible wrote: > Michael Goffioul wrote: >> I encountered a compilation error with MSVC when compiling floor.c in >> strict floating-point mode (-fp:strict). The error is: >> >> "error C2099: initializer is not a constant" >> >> The error is triggered by the

Re: MSVC fails to compile floor.c with -fp:strict

2012-02-23 Thread Bruno Haible
Michael Goffioul wrote: > I encountered a compilation error with MSVC when compiling floor.c in > strict floating-point mode (-fp:strict). The error is: > > "error C2099: initializer is not a constant" > > The error is triggered by the initializer for the constant variable > TWO_MANT_DIG and is d

Ordering of "-I" flags in CPPFLAGS can lead to gnulib headers being skipped

2012-02-23 Thread Michael Goffioul
Hi, While trying to compile octave-3.6.1 with MSVC, I found a problem related to the ordering of include paths in CPPFLAGS. For instance, in liboctave/Makefile.am, the flags are defined as: AM_CPPFLAGS = \ @CPPFLAGS@ -I../libgnu -I$(top_srcdir)/libgnu \ -I$(top_srcdir)/libcruft/misc So if yo

MSVC fails to compile floor.c with -fp:strict

2012-02-23 Thread Michael Goffioul
Hi, I encountered a compilation error with MSVC when compiling floor.c in strict floating-point mode (-fp:strict). The error is: "error C2099: initializer is not a constant" The error is triggered by the initializer for the constant variable TWO_MANT_DIG and is documented here: http://msdn.micr