unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master ab36b56 1/2: ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
       [not found] ` <20191114115159.EC9F020BC2@vcs0.savannah.gnu.org>
@ 2019-11-14 12:26   ` Robert Pluim
  2019-11-14 14:24     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Pluim @ 2019-11-14 12:26 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii

>>>>> On Thu, 14 Nov 2019 06:51:59 -0500 (EST), eliz@gnu.org (Eli Zaretskii) said:

    Eli> branch: master
    Eli> commit ab36b56e40c6af3b3deb8ad768e410d4838615f9
    Eli> Author: Eli Zaretskii <eliz@gnu.org>
    Eli> Commit: Eli Zaretskii <eliz@gnu.org>

    Eli>     ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
    Eli> ---
 
    Eli>  extern bool font_match_p (Lisp_Object spec, Lisp_Object font);
    Eli> +extern bool font_is_ignored (const char *name, ptrdiff_t namelen);
    Eli>  extern Lisp_Object font_list_entities (struct frame *, Lisp_Object);
 
    Eli>  extern Lisp_Object font_get_name (Lisp_Object font_object);

Hmm, with which compiler? The definition of that function is just
before its first use, so the prototype should not be necessary (and
now we have two prototypes for that function, the other is in
gtkutil.h).

Robert



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

* Re: master ab36b56 1/2: ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
  2019-11-14 12:26   ` master ab36b56 1/2: ; * src/font.h (font_is_ignored): Add prototype to avoid warnings Robert Pluim
@ 2019-11-14 14:24     ` Eli Zaretskii
  2019-11-14 14:41       ` Robert Pluim
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2019-11-14 14:24 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Thu, 14 Nov 2019 13:26:13 +0100
> 
>     Eli>     ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
>     Eli> ---
>  
>     Eli>  extern bool font_match_p (Lisp_Object spec, Lisp_Object font);
>     Eli> +extern bool font_is_ignored (const char *name, ptrdiff_t namelen);
>     Eli>  extern Lisp_Object font_list_entities (struct frame *, Lisp_Object);
>  
>     Eli>  extern Lisp_Object font_get_name (Lisp_Object font_object);
> 
> Hmm, with which compiler?

GCC 7.3.0.

> The definition of that function is just before its first use

The paranoid warning options used by the developers' build causes GCC
to complain about non-static functions that have no prototype in
scope.

> (and now we have two prototypes for that function, the other is in
> gtkutil.h).

That one should be removed, because gkutil.c (indirectly) includes
font.h, AFAICT.



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

* Re: master ab36b56 1/2: ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
  2019-11-14 14:24     ` Eli Zaretskii
@ 2019-11-14 14:41       ` Robert Pluim
  2019-11-14 14:49         ` Eli Zaretskii
  2019-11-14 16:55         ` Paul Eggert
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Pluim @ 2019-11-14 14:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>>>>> On Thu, 14 Nov 2019 16:24:38 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> Hmm, with which compiler?

    Eli> GCC 7.3.0.

    >> The definition of that function is just before its first use

    Eli> The paranoid warning options used by the developers' build causes GCC
    Eli> to complain about non-static functions that have no prototype in
    Eli> scope.

Oh, I donʼt run configure with --enable-gcc-warnings (I seem to
remember Paul warning against that).

    >> (and now we have two prototypes for that function, the other is in
    >> gtkutil.h).

    Eli> That one should be removed, because gkutil.c (indirectly) includes
    Eli> font.h, AFAICT.

Yes, which causes lots of warnings in a GTK build. Removed.

Robert



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

* Re: master ab36b56 1/2: ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
  2019-11-14 14:41       ` Robert Pluim
@ 2019-11-14 14:49         ` Eli Zaretskii
  2019-11-14 16:55         ` Paul Eggert
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2019-11-14 14:49 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 14 Nov 2019 15:41:52 +0100
> 
>     Eli> The paranoid warning options used by the developers' build causes GCC
>     Eli> to complain about non-static functions that have no prototype in
>     Eli> scope.
> 
> Oh, I donʼt run configure with --enable-gcc-warnings (I seem to
> remember Paul warning against that).

Neither do I.  But --enable-checking turns it on, AFAIR.

>     >> (and now we have two prototypes for that function, the other is in
>     >> gtkutil.h).
> 
>     Eli> That one should be removed, because gkutil.c (indirectly) includes
>     Eli> font.h, AFAICT.
> 
> Yes, which causes lots of warnings in a GTK build. Removed.

Thanks.



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

* Re: master ab36b56 1/2: ; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
  2019-11-14 14:41       ` Robert Pluim
  2019-11-14 14:49         ` Eli Zaretskii
@ 2019-11-14 16:55         ` Paul Eggert
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Eggert @ 2019-11-14 16:55 UTC (permalink / raw)
  To: Robert Pluim, Eli Zaretskii; +Cc: emacs-devel

On 11/14/19 6:41 AM, Robert Pluim wrote:
> Oh, I donʼt run configure with --enable-gcc-warnings (I seem to
> remember Paul warning against that).

I warn against it for people who are just building Emacs, as it 
generates so many false alarms. For developers it can be useful, though, 
as we can silence the false alarms and change the warnings options if 
there are too many warnings.

If you're building from git (as opposed to building from a tarball), 
--enable-gcc-warnings='warn-only' is the default, because the assumption 
is that you're at least a developer-lite.



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

end of thread, other threads:[~2019-11-14 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20191114115158.1987.26946@vcs0.savannah.gnu.org>
     [not found] ` <20191114115159.EC9F020BC2@vcs0.savannah.gnu.org>
2019-11-14 12:26   ` master ab36b56 1/2: ; * src/font.h (font_is_ignored): Add prototype to avoid warnings Robert Pluim
2019-11-14 14:24     ` Eli Zaretskii
2019-11-14 14:41       ` Robert Pluim
2019-11-14 14:49         ` Eli Zaretskii
2019-11-14 16:55         ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).