Re: GDC environment variable

2022-12-06 Thread Ankur Saini via Gcc
I do see make using ‘GDC' while building gcc compiler, maybe try changing that ? - Ankur > On 07-Dec-2022, at 11:42 AM, Dave Blanchard wrote: > > Is there an environment variable like 'CC' or 'CXX', which specifies the name > of the D compiler to use, which I might need to set when bootstrappi

GDC environment variable

2022-12-06 Thread Dave Blanchard
Is there an environment variable like 'CC' or 'CXX', which specifies the name of the D compiler to use, which I might need to set when bootstrapping GCC? Thanks. -- Dave Blanchard

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-06 Thread chuanqi.xcq via Gcc
Hi Nathan, > 1) 'save' -- does it *cause* the bmi to be saved, or is that actually > controlled by other options? (I suspect the latter) Yes, it causes the bmi to be saved. In fact, when we add `-save-temps` option in clang and we compile a module unit, we'll see the preprocessed output, the bm

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-06 Thread Jonathan Wakely via Gcc
On Wed, 7 Dec 2022, 00:36 Nathan Sidwell via Gcc, wrote: > On 12/6/22 16:03, David Blaikie wrote: > > Over in https://reviews.llvm.org/D137059 we're discussing the naming > > of a clang flag - would be good to have it be consistent with GCC. > > > > The functionality is to name the BMI (.pcm in C

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-06 Thread Nathan Sidwell via Gcc
On 12/6/22 16:03, David Blaikie wrote: Over in https://reviews.llvm.org/D137059 we're discussing the naming of a clang flag - would be good to have it be consistent with GCC. The functionality is to name the BMI (.pcm in Clang's parlance) output file when compiling a C++20 module. Current propo

Naming flag for specifying the output file name for Binary Module Interface files

2022-12-06 Thread David Blaikie via Gcc
Over in https://reviews.llvm.org/D137059 we're discussing the naming of a clang flag - would be good to have it be consistent with GCC. The functionality is to name the BMI (.pcm in Clang's parlance) output file when compiling a C++20 module. Current proposal is to use `-fsave-std-cxx-module-file

D

2022-12-06 Thread Malika Houston via Gcc
Sent from my iPhone

Re: Using [[may_alias]] in C23/C++23 on a union works in neither post-"union" position, or at the end of the definition

2022-12-06 Thread Jonathan Wakely via Gcc
On Tue, 6 Dec 2022 at 20:32, Gavin Ray wrote: > > Ah got it, didn't know that (handy, will save me duplicating a bunch of > attributes). > Thanks Jonathan! The Clang doc acually show all the forms that can be used for each attribute: https://clang.llvm.org/docs/AttributeReference.html#may-alias

Re: Using [[may_alias]] in C23/C++23 on a union works in neither post-"union" position, or at the end of the definition

2022-12-06 Thread Gavin Ray via Gcc
Ah got it, didn't know that (handy, will save me duplicating a bunch of attributes). Thanks Jonathan! On Tue, Dec 6, 2022 at 2:23 PM Jonathan Wakely wrote: > > > On Tue, 6 Dec 2022, 18:36 Gavin Ray via Gcc, wrote: > >> Oh, D'oh! Thanks Joseph, apologies for the needless email on the list >> the

Re: Using [[may_alias]] in C23/C++23 on a union works in neither post-"union" position, or at the end of the definition

2022-12-06 Thread Jonathan Wakely via Gcc
On Tue, 6 Dec 2022, 18:36 Gavin Ray via Gcc, wrote: > Oh, D'oh! Thanks Joseph, apologies for the needless email on the list then. > > One final question if I could -- does that mean that in order to support > "may-alias" with the bracket syntax on both Clang and GCC, it would > require: > > unio

Re: Using [[may_alias]] in C23/C++23 on a union works in neither post-"union" position, or at the end of the definition

2022-12-06 Thread Gavin Ray via Gcc
Oh, D'oh! Thanks Joseph, apologies for the needless email on the list then. One final question if I could -- does that mean that in order to support "may-alias" with the bracket syntax on both Clang and GCC, it would require: union [[gnu::may_alias]] [[clang::may_alias]] foo {}; On Tue, Dec 6,

Re: Using [[may_alias]] in C23/C++23 on a union works in neither post-"union" position, or at the end of the definition

2022-12-06 Thread Joseph Myers
On Mon, 5 Dec 2022, Gavin Ray via Gcc wrote: > union [[may_alias]] broken2 {}; With [[]] syntax it's [[gnu::may_alias]], since it's not a standard attribute. -- Joseph S. Myers jos...@codesourcery.com

Re: Separate warning/error thresholds for -Wfoo=

2022-12-06 Thread Alexander Monakov via Gcc
On Tue, 6 Dec 2022, Richard Biener via Gcc wrote: > Implementation-wise one could do a similar trick as we have for > global_options vs. global_options_set - add a global_options_error copy (ick!) > (and global_options_error_set!?) and have the logic that decides whether > a warning is an error

Re: Separate warning/error thresholds for -Wfoo=

2022-12-06 Thread Richard Biener via Gcc
On Tue, Dec 6, 2022 at 4:53 PM Alexander Monakov via Gcc wrote: > > Greetings, David, community, > > I'd like to get your input on how GCC command line interface should support > making a "tiered" warning like -Warray-bounds={1,2} an error for "tier 1" > where fewer false positives are expected, a

Spurious warning for zero-sized array parameters to a function

2022-12-06 Thread Alejandro Colomar via Gcc
Hi! In the following function, past_end is a pointer to one-past-the-end of the array. Holding such a pointer is legal in C. I use it as a sentinel value that helps (1) avoid overrunning the buffer, and (2) detect truncation. I mark it as having a size of [0], which clearly states that it c

Re: -fprofile-update=atomic vs. 32-bit architectures

2022-12-06 Thread Richard Biener via Gcc
On Tue, Dec 6, 2022 at 2:11 PM Sebastian Huber wrote: > > On 05/12/2022 08:44, Richard Biener wrote: > > On Mon, Dec 5, 2022 at 8:26 AM Sebastian Huber > > wrote: > >> On 08/11/2022 11:25, Richard Biener wrote: > It would be great to have a code example for the construction of the "if > >>>

Separate warning/error thresholds for -Wfoo=

2022-12-06 Thread Alexander Monakov via Gcc
Greetings, David, community, I'd like to get your input on how GCC command line interface should support making a "tiered" warning like -Warray-bounds={1,2} an error for "tier 1" where fewer false positives are expected, and a plain warning otherwise. There was a recent thread mentioning the curr

Re: -fprofile-update=atomic vs. 32-bit architectures

2022-12-06 Thread Sebastian Huber
On 05/12/2022 08:44, Richard Biener wrote: On Mon, Dec 5, 2022 at 8:26 AM Sebastian Huber wrote: On 08/11/2022 11:25, Richard Biener wrote: It would be great to have a code example for the construction of the "if (f()) f();". I think for the function above we need to emit __atomic_fetch_add_