public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: Stephan Gatzka <stephan.gatzka@gmail.com>, gcc-help@gcc.gnu.org
Subject: Re: parameter type of  -frandom-seed
Date: Tue, 01 Sep 2015 17:33:00 -0000	[thread overview]
Message-ID: <55E5E180.2040305@gmail.com> (raw)
In-Reply-To: <1440699388.5889.2.camel@gmail.com>

On 08/27/2015 12:16 PM, Stephan Gatzka wrote:
>
>> The option argument is processed in the set_random_seed function in
>> toplev.c. The function takes a string argument and calls strtoul on
>> it to obtain the numeric random seed (strtoul is called with the base
>> argument of zero letting it detect it from the prefix). When strtoul
>> fails, set_random_seed calls crc32_string with the string argument.
>> So the function is capable of processing both numeric and string
>> arguments.
>
> Thanks for diving into the sources.
>
>> I suppose the question is whether GCC should should be
>> changed back to accept string arguments as originally implemented,
>> or whether it should stay as is and the option specification changed
>> to match the documentation.
>
> Well, I would stay with the implementation and allow strings. So
> reverting the docs back to string would be fine.

I opened driver/67425 for this and outlined the two solutions we've
discussed.

Martin

  reply	other threads:[~2015-09-01 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 16:48 Stephan Gatzka
2015-08-25 23:42 ` Martin Sebor
2015-08-27  5:36   ` Stephan Gatzka
2015-08-27 15:31     ` Martin Sebor
2015-08-27 18:16       ` Stephan Gatzka
2015-09-01 17:33         ` Martin Sebor [this message]
2015-09-01 18:31           ` Stephan Gatzka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E5E180.2040305@gmail.com \
    --to=msebor@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=stephan.gatzka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).