bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* Use module 'c99' when needed for subobject initializers
@ 2020-09-05 17:57 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2020-09-05 17:57 UTC (permalink / raw)
  To: bug-gnulib

When compiling a gnulib testdir with CC="gcc -std=gnu90 -pedantic" (without
the 'c99' module) I see these warnings:

tempname.c:215:7: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
tempname.c:216:7: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
tempname.c:217:7: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
regcomp.c:562:3: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
regcomp.c:3709:27: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
regcomp.c:3709:51: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
regcomp.c:3800:20: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
regexec.c:600:31: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
test-nstrftime.c:230:25: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
test-nstrftime.c:257:20: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]
test-nstrftime.c:257:44: warning: ISO C90 forbids specifying subobject to initialize [-Wpedantic]

Thus, the modules
  tempname
  regex
  nstrftime-tests
need a dependency to 'c99'.


2020-09-05  Bruno Haible  <bruno@clisp.org>

	Use module 'c99' when needed for subobject initializer syntax.
	* modules/tempname (Depends-on): Add c99.
	* modules/nstrftime-tests (Depends-on): Likewise.

diff --git a/modules/nstrftime-tests b/modules/nstrftime-tests
index 4089771..ed2430a 100644
--- a/modules/nstrftime-tests
+++ b/modules/nstrftime-tests
@@ -4,6 +4,7 @@ tests/macros.h
 
 Depends-on:
 atoll
+c99
 intprops
 strerror
 
diff --git a/modules/tempname b/modules/tempname
index 794a763..d55f4ce 100644
--- a/modules/tempname
+++ b/modules/tempname
@@ -8,6 +8,7 @@ lib/tempname.h
 m4/tempname.m4
 
 Depends-on:
+c99
 extensions
 fcntl-h
 getrandom



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-05 17:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 17:57 Use module 'c99' when needed for subobject initializers Bruno Haible

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