00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 2013-2022 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * RCS INFORMATION: 00011 * 00012 * $RCSfile: c_compiler.c,v $ 00013 * $Author: johns $ $Locker: $ $State: Exp $ 00014 * $Revision: 1.2 $ $Date: 2022/02/08 19:12:19 $ 00015 * 00016 ***************************************************************************/ 00022 // runtime query of compile-time C compiler language version, 00023 // used by "vmdinfo compilers" command... 00024 const char *c_compiler_std() { 00025 #if (__STDC_VERSION__ >= 201112L) 00026 const char *ccversion = "C11"; // C 2011 00027 #elif (__STDC_VERSION__ >= 199901L) 00028 const char *ccversion = "C99"; // C 1999 00029 #elif (__STDC_VERSION__ >= 199409L) 00030 const char *ccversion = "C90"; // C 1990 00031 #elif defined(__STDC__) 00032 const char *ccversion = "C89"; // C 1989 - ANSI C 00033 #else 00034 const char *ccversion = "Unknown C"; 00035 #endif 00036 00037 return ccversion; 00038 } 00039 00040 00041