diff options
author | Geoffrey Keating <geoffk@apple.com> | 2003-04-12 02:16:46 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2003-04-12 02:16:46 +0000 |
commit | a37db56bde9874b6f2113164e2a31c5bc12616c8 (patch) | |
tree | 743ad4a7d130f0376f5a69b500437fcf54a84cf5 /gcc/toplev.c | |
parent | df0261868594f8e8c8ec2e1a369ca7fe867a2d02 (diff) | |
download | gcc-a37db56bde9874b6f2113164e2a31c5bc12616c8.zip gcc-a37db56bde9874b6f2113164e2a31c5bc12616c8.tar.gz gcc-a37db56bde9874b6f2113164e2a31c5bc12616c8.tar.bz2 |
re PR c++/9393 (Anonymous namespaces and compiling the same file twice)
PR c++/9393
* doc/invoke.texi (Debugging Options): Document -frandom-seed.
* configure.in: Check for gettimeofday.
* tree.c (flag_random_seed): Define.
(default_flag_random_seed): New.
(append_random_chars): Use flag_random_seed rather than trying
to acquire randomness here.
* tree.h (default_flag_random_seed): Declare.
* toplev.c (display_help): Add -frandom-seed and -fstack-limit-*
descriptions.
(decode_f_option): Handle -frandom-seed.
(print_switch_values): Call default_flag_random_seed.
* flags.h (flag_random_seed): Declare.
* configure: Regenerate.
* config.in: Regenerate.
* config/alpha/t-crtfm: Use -frandom-seed.
From-SVN: r65500
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 25a6905..3af0bd8 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3842,6 +3842,10 @@ display_help () printf (_(" -fmessage-length=<number> Limits diagnostics messages lengths to <number> characters per line. 0 suppresses line-wrapping\n")); printf (_(" -fdiagnostics-show-location=[once | every-line] Indicates how often source location information should be emitted, as prefix, at the beginning of diagnostics when line-wrapping\n")); printf (_(" -ftls-model=[global-dynamic | local-dynamic | initial-exec | local-exec] Indicates the default thread-local storage code generation model\n")); + printf (_(" -fstack-limit-register=<register> Trap if the stack goes past <register>\n")); + printf (_(" -fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>\n")); + printf (_(" -frandom-seed=<string> Make compile reproducible using <string>\n")); + for (i = ARRAY_SIZE (f_options); i--;) { @@ -4199,6 +4203,10 @@ decode_f_option (arg) } else if (!strcmp (arg, "no-stack-limit")) stack_limit_rtx = NULL_RTX; + else if ((option_value = skip_leading_substring (arg, "random-seed="))) + flag_random_seed = option_value; + else if (!strcmp (arg, "no-random-seed")) + flag_random_seed = NULL; else if (!strcmp (arg, "preprocessed")) /* Recognize this switch but do nothing. This prevents warnings about an unrecognized switch if cpplib has not been linked in. */ @@ -4759,6 +4767,12 @@ print_switch_values (file, pos, max, indent, sep, term) size_t j; char **p; + /* Fill in the -frandom-seed option, if the user didn't pass it, so + that it can be printed below. This helps reproducibility. Of + course, the string may never be used, but we can't tell that at + this point in the compile. */ + default_flag_random_seed (); + /* Print the options as passed. */ pos = print_single_switch (file, pos, max, indent, *indent ? " " : "", term, |