Fix test for use of noreturn.

This commit is contained in:
Arnold D. Robbins 2020-05-15 15:12:15 +03:00
parent 93e5dd87a1
commit 1107437dce
3 changed files with 6 additions and 2 deletions

4
FIXES
View File

@ -25,6 +25,10 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987. was sent to the printers in August, 1987.
May 5, 2020:
Fix checks for compilers that can handle noreturn. Thanks to
GitHub user enh-google for pointing it out. Closes Issue #79.
April 16, 2020: April 16, 2020:
Handle old compilers that don't support C11 (for noreturn). Handle old compilers that don't support C11 (for noreturn).
Thanks to Arnold Robbins. Thanks to Arnold Robbins.

2
awk.h
View File

@ -25,7 +25,7 @@ THIS SOFTWARE.
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#if __STDC__ <= 199901L #if __STDC_VERSION__ <= 199901L
#define noreturn #define noreturn
#else #else
#include <stdnoreturn.h> #include <stdnoreturn.h>

2
main.c
View File

@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE. THIS SOFTWARE.
****************************************************************/ ****************************************************************/
const char *version = "version 20200416"; const char *version = "version 20200515";
#define DEBUG #define DEBUG
#include <stdio.h> #include <stdio.h>