bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/19] _Noreturn: new module


From: Paul Eggert
Subject: Re: [PATCH 02/19] _Noreturn: new module
Date: Mon, 11 Jul 2011 15:45:05 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Thunderbird/3.1.11

On 07/11/11 15:20, Bruno Haible wrote:

> I would therefore suggest:
>   1) To find a naming convention for the 4 modules'arg-nonnull', 'c++defs',
>      'warn-on-use', '_Noreturn' that makes it clear that they don't provide
>      ready-to-use C macros.

Yes, that'd be fine.

How about renaming each module FOO to aux-FOO?  E.g., 'aux-arg-nonnull'.
Or perhaps build-aux-FOO, if "aux" is too cryptic.

>   2) To remove the module '_Noreturn-tests', and instead merge it into
>      the module 'stdnoreturn-tests'.

Yes, that'd be fine, too.  Patch below.

>      Do we need a test of the C macro in gnulib-common.m4?

Not really, since stdnoreturn-tests tests it.

Here's the patch for (2).

_Noreturn-tests: remove module
* modules/_Noreturn-tests: Remove.
* modules/stdnoreturn-tests (Files): Remove tests/test-_Noreturn.c.
* tests/test-_Noreturn.c: Remove.
* tests/test-stdnoreturn.c: Merge from the old
tests/test-_Noreturn.c, testing both noreturn and _Noreturn.
diff --git a/modules/_Noreturn-tests b/modules/_Noreturn-tests
deleted file mode 100644
index 9afb231..0000000
--- a/modules/_Noreturn-tests
+++ /dev/null
@@ -1,10 +0,0 @@
-Files:
-tests/test-_Noreturn.c
-
-Depends-on:
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-_Noreturn
-check_PROGRAMS += test-_Noreturn
diff --git a/modules/stdnoreturn-tests b/modules/stdnoreturn-tests
index 6f66a2c..1d1f820 100644
--- a/modules/stdnoreturn-tests
+++ b/modules/stdnoreturn-tests
@@ -1,6 +1,5 @@
 Files:
 tests/test-stdnoreturn.c
-tests/test-_Noreturn.c

 Depends-on:

diff --git a/tests/test-_Noreturn.c b/tests/test-stdnoreturn.c
similarity index 84%
rename from tests/test-_Noreturn.c
rename to tests/test-stdnoreturn.c
index c97ef07..fed5e54 100644
--- a/tests/test-_Noreturn.c
+++ b/tests/test-stdnoreturn.c
@@ -1,4 +1,4 @@
-/* Test of _Noreturn.
+/* Test of <stdnoreturn.h> and _Noreturn.
    Copyright 2011 Free Software Foundation, Inc.

    This program is free software: you can redistribute it and/or modify
@@ -18,18 +18,13 @@

 #include <config.h>

-#ifdef TEST_STDNORETURN
-# include <stdnoreturn.h>
-# define NORETURN noreturn
-#else
-# define NORETURN _Noreturn
-#endif
+#include <stdnoreturn.h>

 /* But did he ever return?  No he never returned,
    And his fate is still unlearned ... */
-static NORETURN void MTA (void);
+static noreturn void MTA (void);

-static NORETURN void
+static _Noreturn void
 Charlie (void)
 {
   MTA ();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]