unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* -Wundef warning in striconveh.h
@ 2011-03-17 10:20 Andy Wingo
  2011-03-17 14:05 ` Eric Blake
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Wingo @ 2011-03-17 10:20 UTC (permalink / raw)
  To: bug-gnulib; +Cc: bug-guile

Hello,

striconveh.h:22 and striconveh.h:34 use #if when they should use #ifdef,
or something.

Building Guile a contributor got this warning:

  CC     libguile_2.0_la-bytevectors.lo
In file included from bytevectors.c:41:0:
../lib/striconveh.h:22:5: warning: "HAVE_ICONV" is not defined [-Wundef]
In file included from bytevectors.c:41:0:
../lib/striconveh.h:34:5: warning: "HAVE_ICONV" is not defined [-Wundef]

Thanks,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -Wundef warning in striconveh.h
  2011-03-17 10:20 -Wundef warning in striconveh.h Andy Wingo
@ 2011-03-17 14:05 ` Eric Blake
  2011-03-17 14:46   ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Blake @ 2011-03-17 14:05 UTC (permalink / raw)
  To: Andy Wingo; +Cc: bug-guile, bug-gnulib

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

On 03/17/2011 04:20 AM, Andy Wingo wrote:
> Hello,
> 
> striconveh.h:22 and striconveh.h:34 use #if when they should use #ifdef,
> or something.

Not a bug in gnulib,

> 
> Building Guile a contributor got this warning:

but in guile.  Gnulib specifically documents that -Wundef is
incompatible with gnulib modules, and that our coding style is
deliberate.  -Wundef only catches portability problems for ancient
(non-C89) compilers, and gnulib requires C89 as a bare minimum.  While
you are free to use it for the rest of your project, you need to avoid
it while compiling gnulib (or at least ignore the warnings and avoid
-Werror).

The coreutils project demonstrates how to have two different set of
warning flags appended to AM_CFLAGS: a looser set for the gnulib
subdirectory, and a stricter set for the rest of the project.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -Wundef warning in striconveh.h
  2011-03-17 14:05 ` Eric Blake
@ 2011-03-17 14:46   ` Andy Wingo
  2011-03-17 16:15     ` Paul Eggert
  2011-04-25 21:35     ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Wingo @ 2011-03-17 14:46 UTC (permalink / raw)
  To: Eric Blake; +Cc: bug-guile, bug-gnulib

Hi Eric,

On Thu 17 Mar 2011 15:05, Eric Blake <eblake@redhat.com> writes:

> On 03/17/2011 04:20 AM, Andy Wingo wrote:
>> striconveh.h:22 and striconveh.h:34 use #if when they should use #ifdef,
>> or something.
>
> Not a bug in gnulib,
>
>> 
>> Building Guile a contributor got this warning:
>
> but in guile.  Gnulib specifically documents that -Wundef is
> incompatible with gnulib modules, and that our coding style is
> deliberate.  -Wundef only catches portability problems for ancient
> (non-C89) compilers, and gnulib requires C89 as a bare minimum.  While
> you are free to use it for the rest of your project, you need to avoid
> it while compiling gnulib (or at least ignore the warnings and avoid
> -Werror).

This error did not occur while compiling gnulib (in the lib/) directory,
but rather libguile, which included striconveh.h.  I believe we already
follow your suggestions for building gnulib itself.

Can you consider changing this one header file?  It does not sound like
an issue on which it is fruitful to be stubborn.

See also this thread also:

  http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/24225

Do you have a response to Ludovic's concerns in his second message?

Regards,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -Wundef warning in striconveh.h
  2011-03-17 14:46   ` Andy Wingo
@ 2011-03-17 16:15     ` Paul Eggert
  2011-03-17 17:03       ` Andy Wingo
  2011-04-25 21:35     ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Eggert @ 2011-03-17 16:15 UTC (permalink / raw)
  To: Andy Wingo; +Cc: bug-guile, bug-gnulib, Eric Blake

On 03/17/2011 07:46 AM, Andy Wingo wrote:
> Can you consider changing this one header file?  It does not sound like
> an issue on which it is fruitful to be stubborn.

Well, there is a bit of stubbornness on both sides here, no?  :-)

But I tend to agree: for headers meant to be included by other code,
it's typically better to avoid warnings like that,
when it's easy (which it is here).



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -Wundef warning in striconveh.h
  2011-03-17 16:15     ` Paul Eggert
@ 2011-03-17 17:03       ` Andy Wingo
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Wingo @ 2011-03-17 17:03 UTC (permalink / raw)
  To: Paul Eggert; +Cc: bug-guile, bug-gnulib, Eric Blake

On Thu 17 Mar 2011 17:15, Paul Eggert <eggert@cs.ucla.edu> writes:

> On 03/17/2011 07:46 AM, Andy Wingo wrote:
>> Can you consider changing this one header file?  It does not sound like
>> an issue on which it is fruitful to be stubborn.
>
> Well, there is a bit of stubbornness on both sides here, no?  :-)

Hehe, point taken.  I wouldn't have bothered you, but my users keep
compiling with that and -Werror... they are the stubborn ones! :)

Cheers,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -Wundef warning in striconveh.h
  2011-03-17 14:46   ` Andy Wingo
  2011-03-17 16:15     ` Paul Eggert
@ 2011-04-25 21:35     ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2011-04-25 21:35 UTC (permalink / raw)
  To: bug-guile; +Cc: bug-gnulib

Hello,

Andy Wingo <wingo@pobox.com> writes:

> On Thu 17 Mar 2011 15:05, Eric Blake <eblake@redhat.com> writes:
>
>> On 03/17/2011 04:20 AM, Andy Wingo wrote:
>>> striconveh.h:22 and striconveh.h:34 use #if when they should use #ifdef,
>>> or something.
>>
>> Not a bug in gnulib,
>>
>>> 
>>> Building Guile a contributor got this warning:
>>
>> but in guile.  Gnulib specifically documents that -Wundef is
>> incompatible with gnulib modules, and that our coding style is
>> deliberate.  -Wundef only catches portability problems for ancient
>> (non-C89) compilers, and gnulib requires C89 as a bare minimum.  While
>> you are free to use it for the rest of your project, you need to avoid
>> it while compiling gnulib (or at least ignore the warnings and avoid
>> -Werror).
>
> This error did not occur while compiling gnulib (in the lib/) directory,
> but rather libguile, which included striconveh.h.  I believe we already
> follow your suggestions for building gnulib itself.

[...]

> See also this thread also:
>
>   http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/24225
>
> Do you have a response to Ludovic's concerns in his second message?

Unfortunately <verify.h> now similarly prevents use of -Wundef by its
users (again this happens when compiling libguile; Gnulib itself is
compiled _without_ -Wundef):

  verify.h:177:8: error: "HAVE_STATIC_ASSERT" is not defined [-Werror=undef]

I’m giving up on compiling Guile itself with -Wundef, but I’d prefer it
if Gnulib did not impose its policy on Guile.

Would you be willing to fix the problematic headers?  I’d be happy to
help with that, as I did in the past.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-25 21:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-17 10:20 -Wundef warning in striconveh.h Andy Wingo
2011-03-17 14:05 ` Eric Blake
2011-03-17 14:46   ` Andy Wingo
2011-03-17 16:15     ` Paul Eggert
2011-03-17 17:03       ` Andy Wingo
2011-04-25 21:35     ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).