summaryrefslogtreecommitdiffhomepage
path: root/src/driver/amgc_driver_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver/amgc_driver_ctx.c')
-rw-r--r--src/driver/amgc_driver_ctx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/driver/amgc_driver_ctx.c b/src/driver/amgc_driver_ctx.c
index 7bb59a9..d2bef3f 100644
--- a/src/driver/amgc_driver_ctx.c
+++ b/src/driver/amgc_driver_ctx.c
@@ -8,6 +8,7 @@
#include <unistd.h>
#include <fcntl.h>
+#include <cparser/driver/c_driver.h>
#include <cparser/driver/driver.h>
#include <cparser/driver/driver_t.h>
#include <cparser/driver/target.h>
@@ -143,6 +144,9 @@ int amgc_get_driver_ctx(
if (!argv[1] && (flags & AMGC_DRIVER_VERBOSITY_USAGE))
return amgc_driver_usage(program,0,options,meta);
+ /* compiler defaults */
+ cctx.std = STANDARD_C99;
+
/* get options, count units */
for (entry=meta->entries; entry->fopt || entry->arg; entry++) {
if (entry->fopt) {
@@ -154,6 +158,10 @@ int amgc_get_driver_ctx(
case TAG_VERSION:
cctx.drvflags |= AMGC_DRIVER_VERSION;
break;
+
+ case TAG_LANG_STD:
+ cctx.std = amgc_lang_std_from_string(entry->arg);
+ break;
}
} else
nunits++;