* bug#40780: guile 3.0.2: Prevent warning using libguile with -Wpedantic (redefinition)
@ 2020-04-22 19:30 Hannes Müller
2020-12-05 11:25 ` bug#40780: guile 3.0.4: #40780 can be closed (typedef redefinition allowed in c11) Hannes Müller
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Müller @ 2020-04-22 19:30 UTC (permalink / raw)
To: 40780
Dear Maintainer,
2 warnings as shown below for libguile 3.0.2 (i.e. usage of libguile in
external C code) with gcc 9.3.0 and option -Wpedantic are indicated. In
contrast I get no warnings for libguile 2.2.7 with the same compiler
options. Therefore, please fix this easy to circumvent warning.
Best regards
Hannes
In file included from /usr/include/guile/3.0/libguile/numbers.h:29,
from /usr/include/guile/3.0/libguile/array-
handle.h:27,
from /usr/include/guile/3.0/libguile.h:35,
from read_cfg.c:7:
/usr/include/guile/3.0/libguile/print.h:79:3: warning: redefinition of
typedef 'scm_print_state' [-Wpedantic]
79 | } scm_print_state;
| ^~~~~~~~~~~~~~~
In file included from /usr/include/guile/3.0/libguile.h:33,
from read_cfg.c:7:
/usr/include/guile/3.0/libguile/scm.h:824:32: note: previous
declaration of 'scm_print_state' was here
824 | typedef struct scm_print_state scm_print_state;
| ^~~~~~~~~~~~~~~
In file included from /usr/include/guile/3.0/libguile/threads.h:27,
from /usr/include/guile/3.0/libguile/async.h:25,
from /usr/include/guile/3.0/libguile.h:38,
from read_cfg.c:7:
/usr/include/guile/3.0/libguile/dynstack.h:37:3: warning: redefinition
of typedef 'scm_t_dynstack' [-Wpedantic]
37 | } scm_t_dynstack;
| ^~~~~~~~~~~~~~
In file included from /usr/include/guile/3.0/libguile.h:33,
from read_cfg.c:7:
/usr/include/guile/3.0/libguile/scm.h:825:29: note: previous
declaration of 'scm_t_dynstack' was here
825 | typedef struct scm_dynstack scm_t_dynstack;
| ^~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#40780: guile 3.0.4: #40780 can be closed (typedef redefinition allowed in c11)
2020-04-22 19:30 bug#40780: guile 3.0.2: Prevent warning using libguile with -Wpedantic (redefinition) Hannes Müller
@ 2020-12-05 11:25 ` Hannes Müller
0 siblings, 0 replies; 2+ messages in thread
From: Hannes Müller @ 2020-12-05 11:25 UTC (permalink / raw)
To: 40780
Dear Maintainer,
I consider this bug report can be closed.
The 2011 C standard allows redeclaration of typedef names. 6.7 3 says:
… a typedef name may be redefined to denote the same type as it
currently does, provided that type is not a variably modified type;…
I compiled my application with -std=c11 and -Wpedantic using libguile
3.0.4: no warning is shown any more.
Thanks!
Hannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-05 11:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 19:30 bug#40780: guile 3.0.2: Prevent warning using libguile with -Wpedantic (redefinition) Hannes Müller
2020-12-05 11:25 ` bug#40780: guile 3.0.4: #40780 can be closed (typedef redefinition allowed in c11) Hannes Müller
unofficial mirror of bug-guile@gnu.org
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
bug-guile@gnu.org
public-inbox-index guile-bugs
Example config snippet for mirrors.
Newsgroups are available over NNTP:
nntp://news.yhetil.org/yhetil.lisp.guile.bugs
nntp://news.gmane.io/gmane.lisp.guile.bugs
AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git