@@ -755,7 +755,7 @@ static int run_cmd(int argc, char **argv, cmd_state_t *state)
755
755
{ "stop-delta" , required_argument , 0 , 'd' },
756
756
{ "format" , required_argument , 0 , 'f' },
757
757
{ "include" , required_argument , 0 , 'i' },
758
- { "ieee-warnings" , required_argument , 0 , 'I' },
758
+ { "ieee-warnings" , required_argument , 0 , 'I' }, // DEPRECATED 1.16
759
759
{ "exclude" , required_argument , 0 , 'e' },
760
760
{ "exit-severity" , required_argument , 0 , 'x' },
761
761
{ "dump-arrays" , optional_argument , 0 , 'a' },
@@ -847,7 +847,17 @@ static int run_cmd(int argc, char **argv, cmd_state_t *state)
847
847
parse_exit_severity (optarg );
848
848
break ;
849
849
case 'I' :
850
- opt_set_int (OPT_IEEE_WARNINGS , parse_on_off (optarg ));
850
+ {
851
+ const bool on = parse_on_off (optarg );
852
+
853
+ // TODO: add an unconditional warning after 1.16
854
+ if (state -> jit != NULL && opt_get_int (OPT_IEEE_WARNINGS ) != on )
855
+ warnf ("the $bold$--ieee-warnings$$ option may have no affect "
856
+ "as the IEEE packages have already been initialised, pass "
857
+ "$bold$--ieee-warnings$$ as a global option instead" );
858
+
859
+ opt_set_int (OPT_IEEE_WARNINGS , on );
860
+ }
851
861
break ;
852
862
case 'a' :
853
863
if (optarg == NULL )
@@ -862,7 +872,7 @@ static int run_cmd(int argc, char **argv, cmd_state_t *state)
862
872
opt_set_int (OPT_SHUFFLE_PROCS , 1 );
863
873
break ;
864
874
default :
865
- abort ();
875
+ should_not_reach_here ();
866
876
}
867
877
}
868
878
@@ -2069,6 +2079,8 @@ static void usage(void)
2069
2079
"Global options may be placed before COMMAND:\n"
2070
2080
" -h, --help\t\tDisplay this message and exit\n"
2071
2081
" -H SIZE\t\tSet the maximum heap size to SIZE bytes\n"
2082
+ " --ieee-warnings=\tEnable ('on') or disable ('off') warnings\n"
2083
+ " \tfrom IEEE packages\n"
2072
2084
" --ignore-time\tSkip source file timestamp check\n"
2073
2085
" --load=PLUGIN\tLoad VHPI plugin at startup\n"
2074
2086
" -L PATH\t\tAdd PATH to library search paths\n"
@@ -2116,8 +2128,6 @@ static void usage(void)
2116
2128
" --exit-severity=\tExit after assertion failure of "
2117
2129
"this severity\n"
2118
2130
" --format=FMT\tWaveform format is either fst or vcd\n"
2119
- " --ieee-warnings=\tEnable ('on') or disable ('off') warnings\n"
2120
- " \tfrom IEEE packages\n"
2121
2131
" --include=GLOB\tInclude signals matching GLOB in wave dump\n"
2122
2132
" --shuffle\t\tRun processes in random order\n"
2123
2133
" --stats\t\tPrint time and memory usage at end of run\n"
@@ -2331,19 +2341,20 @@ int main(int argc, char **argv)
2331
2341
atexit (fbuf_cleanup );
2332
2342
2333
2343
static struct option long_options [] = {
2334
- { "help" , no_argument , 0 , 'h' },
2335
- { "version" , no_argument , 0 , 'v' },
2336
- { "work" , required_argument , 0 , 'w' },
2337
- { "std" , required_argument , 0 , 's' },
2338
- { "messages" , required_argument , 0 , 'I' },
2339
- { "native" , no_argument , 0 , 'n' }, // DEPRECATED 1.4
2340
- { "map" , required_argument , 0 , 'p' },
2341
- { "ignore-time" , no_argument , 0 , 'i' },
2342
- { "force-init" , no_argument , 0 , 'f' }, // DEPRECATED 1.7
2343
- { "stderr" , required_argument , 0 , 'E' },
2344
- { "load" , required_argument , 0 , 'l' },
2345
- { "vhpi-debug" , no_argument , 0 , 'D' },
2346
- { "vhpi-trace" , no_argument , 0 , 'T' },
2344
+ { "help" , no_argument , 0 , 'h' },
2345
+ { "version" , no_argument , 0 , 'v' },
2346
+ { "work" , required_argument , 0 , 'w' },
2347
+ { "std" , required_argument , 0 , 's' },
2348
+ { "messages" , required_argument , 0 , 'I' },
2349
+ { "native" , no_argument , 0 , 'n' }, // DEPRECATED 1.4
2350
+ { "map" , required_argument , 0 , 'p' },
2351
+ { "ieee-warnings" , required_argument , 0 , 'W' },
2352
+ { "ignore-time" , no_argument , 0 , 'i' },
2353
+ { "force-init" , no_argument , 0 , 'f' }, // DEPRECATED 1.7
2354
+ { "stderr" , required_argument , 0 , 'E' },
2355
+ { "load" , required_argument , 0 , 'l' },
2356
+ { "vhpi-debug" , no_argument , 0 , 'D' },
2357
+ { "vhpi-trace" , no_argument , 0 , 'T' },
2347
2358
{ 0 , 0 , 0 , 0 }
2348
2359
};
2349
2360
@@ -2415,12 +2426,15 @@ int main(int argc, char **argv)
2415
2426
case 'D' :
2416
2427
opt_set_int (OPT_PLI_DEBUG , 1 );
2417
2428
break ;
2429
+ case 'W' :
2430
+ opt_set_int (OPT_IEEE_WARNINGS , parse_on_off (optarg ));
2431
+ break ;
2418
2432
case '?' :
2419
2433
bad_option ("global" , argv );
2420
2434
case ':' :
2421
2435
missing_argument ("global" , argv );
2422
2436
default :
2423
- abort ();
2437
+ should_not_reach_here ();
2424
2438
}
2425
2439
}
2426
2440
0 commit comments