shithub: scc

Download patch

ref: 99dab1558595beb06154ebf3a1cf6363d0e9514c
parent: 30cd5966d7653904c1c1c542f6085f204c148e32
author: Quentin Rameau <quinq@fifth.space>
date: Sat Dec 10 09:59:54 EST 2016

[cpp] adjust __STDC_VERSION__ depending on cstd.h

--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -80,7 +80,7 @@
 	strftime(stime, sizeof(stime), "\"%H:%M:%S\"", tm);
 	defdefine("__DATE__", sdate, "built-in");
 	defdefine("__TIME__", stime, "built-in");
-	defdefine("__STDC_VERSION__", "199409L", "built-in");
+	defdefine("__STDC_VERSION__", STDC_VERSION, "built-in");
 	defdefine("__LINE__", NULL, "built-in");
 	defdefine("__FILE__", NULL, "built-in");
 
--- a/inc/c89/cstd.h
+++ b/inc/c89/cstd.h
@@ -1,5 +1,8 @@
 /* See LICENSE file for copyright and license details. */
 
+#define STDC_VERSION    "199409L"
+
+/* Translation limits */
 /*
  * 15 nesting levels of compound statements, iteration control
  * structures, and selection control structures
--- a/inc/c99/cstd.h
+++ b/inc/c99/cstd.h
@@ -1,5 +1,8 @@
 /* See LICENSE file for copyright and license details. */
 
+#define STDC_VERSION    "199901L"
+
+/* Translation limits */
 /*
  * 127 nesting levels of blocks
  */