public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
* Rust Compatibility
@ 2021-09-02 14:06 Philip Herron
  2021-09-05 16:23 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Herron @ 2021-09-02 14:06 UTC (permalink / raw)
  To: gcc-rust; +Cc: David Edelsohn, Brad Spengler, Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

Hi everyone,

Yesterday this issue was posted to us on GitHub
https://github.com/Rust-GCC/gccrs/issues/653, which revolves around
strict-aliasing rules.

The conversation was focused on what level of compatibility we are aiming
for in the Rust language. This is important, and I don't believe we should
allow specific language features/development outside the official Rust
processes. This means we do not want to have any GCC specific attributes or
language features and we won't provide a shortcut to bypass RFC processes.

Though I believe we should always allow users to invoke GCC Rust however
they wish (since the FE inherits the common GCC options), this is the point
of free software to me. To mitigate any GCC vs Rustc incompatibility, our
cargo-gccrs wrapper was always intended to map rust arguments over to the
GCC version of these to get the intended Rustc behaviour. But still, when
users want to invoke gccrs directly, it is up to them to choose what
options they want, good or bad, including using gcc-plugins.

Some of the feedback seems that if we allow users to compile code with or
without strict aliasing, this may allow for code to compile with GCC but
not with rustc which "splits the ecosystem". So I wanted to run this by you
guys here to get feedback on what people think about allowing users to
choose their GCC compilation options in general.

Thanks

--Phil

[-- Attachment #2: Type: text/html, Size: 1524 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Rust Compatibility
  2021-09-02 14:06 Rust Compatibility Philip Herron
@ 2021-09-05 16:23 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2021-09-05 16:23 UTC (permalink / raw)
  To: Philip Herron; +Cc: gcc-rust, David Edelsohn, Brad Spengler

On Thu, Sep 2, 2021 at 7:06 AM Philip Herron <philip.herron@embecosm.com> wrote:
>
> Yesterday this issue was posted to us on GitHub https://github.com/Rust-GCC/gccrs/issues/653, which revolves around strict-aliasing rules.
>
> The conversation was focused on what level of compatibility we are aiming for in the Rust language. This is important, and I don't believe we should allow specific language features/development outside the official Rust processes. This means we do not want to have any GCC specific attributes or language features and we won't provide a shortcut to bypass RFC processes.
>
> Though I believe we should always allow users to invoke GCC Rust however they wish (since the FE inherits the common GCC options), this is the point of free software to me. To mitigate any GCC vs Rustc incompatibility, our cargo-gccrs wrapper was always intended to map rust arguments over to the GCC version of these to get the intended Rustc behaviour. But still, when users want to invoke gccrs directly, it is up to them to choose what options they want, good or bad, including using gcc-plugins.
>
> Some of the feedback seems that if we allow users to compile code with or without strict aliasing, this may allow for code to compile with GCC but not with rustc which "splits the ecosystem". So I wanted to run this by you guys here to get feedback on what people think about allowing users to choose their GCC compilation options in general.

Using that rather strict sense of splitting the ecosystem, there are
various GCC optimization options that will split the ecosystem,
because they will cause code to behave differently.  It's not just
-fstrict-aliasing, it's also options like -ffast-math or
-fexcess-precision which can all cause code to be compiled
differently.  Your choice is to either carefully forbid those options
for Rust or to permit them and warn people accordingly.  Personally I
would favor permitting them.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-05 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02 14:06 Rust Compatibility Philip Herron
2021-09-05 16:23 ` Ian Lance Taylor

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).