Re: Slight typo in #ifdef C preprocessor documentation

2025-07-24 Thread Andrew Pinski via Gcc
On Wed, Jul 23, 2025 at 7:48 PM Evan Cooney via Gcc wrote: > > Hello GNU GCC Developers, > > My name is Evan Cooney and I'm a student at the University of Missouri. I > was reading the documentation for the #ifdef preprocessor macro and I think > I found a slight typo. It is in section 4.2.1 "Ifde

Slight typo in #ifdef C preprocessor documentation

2025-07-23 Thread Evan Cooney via Gcc
Hello GNU GCC Developers, My name is Evan Cooney and I'm a student at the University of Missouri. I was reading the documentation for the #ifdef preprocessor macro and I think I found a slight typo. It is in section 4.2.1 "Ifdef", paragraph 5 (the one that starts with "The comment following the '#

Re: Patrick Palka as C++ front-end reviewer

2025-07-22 Thread Patrick Palka via Gcc
On Tue, 22 Jul 2025, Jason Merrill wrote: > I am pleased to announce that the GCC Steering Committee has appointed > Patrick Palka as a reviewer for the C++ front-end. > Patrick, please update your listing in the MAINTAINERS file. Thank you! Updated MAINTAINERS in r16-2430-gc7208

Patrick Palka as C++ front-end reviewer

2025-07-22 Thread Jason Merrill via Gcc
I am pleased to announce that the GCC Steering Committee has appointed Patrick Palka as a reviewer for the C++ front-end. Patrick, please update your listing in the MAINTAINERS file. Jason

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-11 Thread David Brown via Gcc
can avoid them in the future.  Consistent parameter order makes code clearer and neater, and should be encouraged. For context here, I am a C and gcc user, not a developer of either the compiler or libraries.  That means I have no direct influence on any of this, and I do not have nearly as

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-10 Thread Christopher Bazley via Gcc
parameter order makes code clearer and neater, and should be encouraged. For context here, I am a C and gcc user, not a developer of either the compiler or libraries.  That means I have no direct influence on any of this, and I do not have nearly as wide an experience with different C developers

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-10 Thread David Brown via Gcc
be encouraged. For context here, I am a C and gcc user, not a developer of either the compiler or libraries. That means I have no direct influence on any of this, and I do not have nearly as wide an experience with different C developers and different C code as many of the others here - my

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-10 Thread David Brown via Gcc
On 10/06/2025 10:17, LIU Hao wrote: 在 2025-6-10 15:52, David Brown via Gcc 写道: On 09/06/2025 12:13, Andreas Schwab wrote: On Jun 09 2025, Chris Bazley via Gcc wrote: C is a language that allows considerable latitude in where things are placed: static int volatile p; volatile int

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-10 Thread Jakub Jelinek via Gcc
On Tue, Jun 10, 2025 at 09:52:42AM +0200, David Brown via Gcc wrote: > So while correcting the mistakes of the past is either very slow or > impossible, we can avoid them in the future. Consistent parameter order > makes code clearer and neater, and should be encouraged. If the clauses are proper

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-10 Thread LIU Hao via Gcc
在 2025-6-10 15:52, David Brown via Gcc 写道: On 09/06/2025 12:13, Andreas Schwab wrote: On Jun 09 2025, Chris Bazley via Gcc wrote: C is a language that allows considerable latitude in where things are placed: static int volatile p; volatile int static q; C23 says (6.11.5 Storage

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-10 Thread David Brown via Gcc
On 09/06/2025 12:13, Andreas Schwab wrote: On Jun 09 2025, Chris Bazley via Gcc wrote: C is a language that allows considerable latitude in where things are placed: static int volatile p; volatile int static q; C23 says (6.11.5 Storage-class specifiers): The placement of a

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-09 Thread Andreas Schwab
On Jun 09 2025, Chris Bazley via Gcc wrote: > C is a language that allows considerable latitude in where things are placed: > > static int volatile p; > volatile int static q; C23 says (6.11.5 Storage-class specifiers): The placement of a storage-class specifier other

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-09 Thread Chris Bazley via Gcc
Hi, C is a language that allows considerable latitude in where things are placed: static int volatile p; volatile int static q; I do not think that the order of named parameters should be enforced, nor do I think that diagnostics should be produced if parameters are specified in an

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-08 Thread Michael Welsh Duggan via Gcc
JeanHeyd Meneide via Gcc writes: [...] > While the following 2 invocation of `#embed` are identical and produce > exactly the same data: > > - > #embed clang::offset(1) limit(3) /* ONE */ > #embed limit(3) clang::offset(1) /* TWO */ > - > > some people questioned whether or not the di

Re: [ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-05 Thread Jakub Jelinek via Gcc
On Thu, Jun 05, 2025 at 09:25:11PM +0200, JeanHeyd Meneide wrote: > The C and C++ Compatibility Study Group, when working on the new > standard `#embed` preprocessor parameter that mirrors the > `clang::offset(...)` and `gnu::offset(...)` parameters, had someone > raise a concern that

[ C Frontend / Preprocessor ] Embed Preprocessor Parameter Order

2025-06-05 Thread JeanHeyd Meneide via Gcc
Hi Everyone, The C and C++ Compatibility Study Group, when working on the new standard `#embed` preprocessor parameter that mirrors the `clang::offset(...)` and `gnu::offset(...)` parameters, had someone raise a concern that the order of may be confusing. The concerns came from the June 4th, 2025

'TREE_READONLY' for 'const' array in C vs. C++

2025-04-05 Thread Thomas Schwinge
TION_INFO', GCC/nvptx then uses special-cased instructions for accessing the respective memory regions. Now, given a 'const' array (with whatever element type; not interesting here), like: extern int * const arr[]; ..., for GCC/C compilation, we access this as '.const'

nvptx: Don't use PTX '.const', constant state space [PR119573] (was: 'TREE_READONLY' for 'const' array in C vs. C++)

2025-04-03 Thread Thomas Schwinge
gt; .const Shared, read-only memory. >> > .global Global memory, shared by all threads. >> > >> > Implemented via 'TARGET_ENCODE_SECTION_INFO', GCC/nvptx then uses >> > special-cased instructions for accessing the respective memory regions. >> > >>

Re: 'TREE_READONLY' for 'const' array in C vs. C++

2025-04-01 Thread Richard Biener via Gcc
nteresting > here), like: > > extern int * const arr[]; > > ..., for GCC/C compilation, we access this as '.const' memory: GCC/nvptx > 'DATA_AREA_CONST', but for GCC/C++ compilation, we access it as > 'DATA_AREA_GLOBAL', and then fault at run t

Re: 'TREE_READONLY' for 'const' array in C vs. C++

2025-04-01 Thread Alexander Monakov
On Tue, 1 Apr 2025, Richard Biener via Gcc wrote: > In C++ there could be runtime initializers for a const qualified > object. I think all > you need to do is make sure the logic that places the object in .const > vs. .global > is consistent with the logic deciding how to acce

Re: 'TREE_READONLY' for 'const' array in C vs. C++

2025-04-01 Thread Jakub Jelinek via Gcc
the respective memory regions. > > > > Now, given a 'const' array (with whatever element type; not interesting > > here), like: > > > > extern int * const arr[]; > > > > ..., for GCC/C compilation, we access this as '.const' memory: GC

Re: [GSOC 2025] Interests in extending the static analysis pass(es): support for C++ or CPython API

2025-03-19 Thread zzmic via Gcc
ng on a medium-sized (or > large-sized) project that, broadly speaking, extends the static-analysis > pass(es). In particular, I’ve been dabbling between extending the analyzer’s > support for C++ and extending the plugin to add checking for usage of the > CPython API, such as refere

[GSOC 2025] Interests in extending the static analysis pass(es): support for C++ or CPython API

2025-03-19 Thread zzmic via Gcc
pass(es). In particular, I’ve been dabbling between extending the analyzer’s support for C++ and extending the plugin to add checking for usage of the CPython API, such as reference counting. Both topics can be found in the [ideas list](https://gcc.gnu.org/wiki/SummerOfCode). Nevertheless, I haven’t

web page c++-status proposal revision updates

2025-03-05 Thread Heiko Eißfeldt
For some C++26 language features listed on https://gcc.gnu.org/projects/cxx-status.html there are newer proposal revisions available: Remove undefined behavior from lexing P2621R3 <https://wg21.link/P2621R3> constexpr structured bindings and references to constexpr variables P2686R5

Re: [PATCH v18 0/2] c: Add __countof__ operator

2025-02-28 Thread Alejandro Colomar via Gcc
Hi Joseph, Jakub, On Thu, Feb 27, 2025 at 09:51:35PM +0100, Jakub Jelinek wrote: > On Thu, Feb 27, 2025 at 08:44:25PM +, Joseph Myers via Gcc wrote: > > On Thu, 27 Feb 2025, Alejandro Colomar via Gcc wrote: > > > > > Can you please confirm if we should add a version of this operator that > >

Re: [PATCH v18 0/2] c: Add __countof__ operator

2025-02-27 Thread Jakub Jelinek via Gcc
On Thu, Feb 27, 2025 at 08:44:25PM +, Joseph Myers via Gcc wrote: > On Thu, 27 Feb 2025, Alejandro Colomar via Gcc wrote: > > > Can you please confirm if we should add a version of this operator that > > need not be diagnosed under pedantic mode? If so, I'll propose this > > I'm doubtful of

Re: [PATCH v18 0/2] c: Add __countof__ operator

2025-02-27 Thread Joseph Myers via Gcc
On Thu, 27 Feb 2025, Alejandro Colomar via Gcc wrote: > Can you please confirm if we should add a version of this operator that > need not be diagnosed under pedantic mode? If so, I'll propose this I'm doubtful of the need for a second variant, but in any case the starting point should be a pat

Re: [PATCH v18 0/2] c: Add __countof__ operator

2025-02-27 Thread Alejandro Colomar via Gcc
Hi Joseph, Aaron, (Aaron, there's no code in this email, so you should be able to read it, I guess. We're just discussing the naming of the operator.) Context for readers: The C Committee has finally accepted this as _Countof instead of _Lengthof, due to the concerns regarding conf

Re: Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Hanke Zhang via Gcc
wever, I am not very familiar with GCC source code at present, and that is the reason why I am asking for help here. Thanks, Hanke Zhang Florian Weimer 于2025年1月18日周六 20:50写道: > > * Hanke Zhang via Gcc: > > > I have recently been delving into optimizing dynamic_cast calls in C++ > &

Re: Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Florian Weimer via Gcc
* Hanke Zhang via Gcc: > I have recently been delving into optimizing dynamic_cast calls in C++ > within the context of GIMPLE code. In particular, for scenarios > involving single inheritance, I'm aiming to convert the following > code: > > _1 = __dynamic_cas

Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Hanke Zhang via Gcc
Hi, I have recently been delving into optimizing dynamic_cast calls in C++ within the context of GIMPLE code. In particular, for scenarios involving single inheritance, I'm aiming to convert the following code: _1 = __dynamic_cast (obj_1(D), &_ZTI7Base, &_ZTI10Derived, 0); if (_1!

Xx No m. M C B m

2024-12-17 Thread STEVE MARVIN via Gcc
I’m k B Sent from my iPhone

Help with setting the order of default system include directories of c,c++ preprocessor

2024-11-29 Thread Rajesh Mallah via Gcc
t: aarch64-unknown-linux-gnu 5 Configured with: ../configure --prefix=/mnt/builder/gcc --disable-bootstrap --enable-languages=c,c++ 6 Thread model: posix 7 Supported LTO compression algorithms: zlib 8 gcc version 13.2.1 20240309 (GCC) 9 COLLECT_GCC_OPTIONS='-E' '-v' &#x

Re: [committed] c: Default to -std=gnu23

2024-11-22 Thread Joseph Myers via Gcc
On Fri, 22 Nov 2024, Sam James wrote: > > Some estimate of the build failure would also be helpful. Is it the > > same as, e.g. the GCC 12 to GCC 13 update, or is it igher? > > It's pretty large so far. Between 12 and 13, the main issues were: > libstdc++ transitive include changes and a small n

Re: [committed] c: Default to -std=gnu23

2024-11-22 Thread Sam James via Gcc
Florian Weimer writes: > * Sam James: > >>> Has anyone performed experiments to determine the impact of this change >>> on typical free software distributions? >> >> I filed https://gcc.gnu.org/PR117298 for an issue Joseph noticed in one >> of the GCC tests (that is actually an improvement, but a

Re: [committed] c: Default to -std=gnu23

2024-11-18 Thread Florian Weimer via Gcc
* Joseph Myers: > Change the default language version for C compilation from -std=gnu17 > to -std=gnu23. A few tests are updated to remove local definitions of > bool, true and false (where making such an unconditional test change > seemed to make more sense than changing the test c

Re: [committed] c: Default to -std=gnu23

2024-11-18 Thread Florian Weimer via Gcc
* Sam James: >> Has anyone performed experiments to determine the impact of this change >> on typical free software distributions? > > I filed https://gcc.gnu.org/PR117298 for an issue Joseph noticed in one > of the GCC tests (that is actually an improvement, but a missed opt for > older standards

Re: [committed] c: Default to -std=gnu23

2024-11-17 Thread Sam James via Gcc
Florian Weimer writes: > * Joseph Myers: > >> Change the default language version for C compilation from -std=gnu17 >> to -std=gnu23. A few tests are updated to remove local definitions of >> bool, true and false (where making such an unconditional test change >>

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-11-08 Thread Thorsten Glaser
On Fri, 8 Nov 2024, Alejandro Colomar wrote: >I've just checked that JeanHeyd opened a survey about the name. >It's here: <https://thephd.dev/the-big-array-size-survey-for-c>. Yes, I saw it on Fedi, where it was announced big, and filled it in. Thanks, //mirabilos --

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-11-08 Thread Alejandro Colomar via Gcc
Hi Joseph, On Fri, Nov 08, 2024 at 03:54:51PM GMT, Joseph Myers wrote: > On Fri, 8 Nov 2024, Alejandro Colomar wrote: > > > Hi Thorsten, JeanHeyd, > > > > I've just checked that JeanHeyd opened a survey about the name. > > It's here: <https:/

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-11-08 Thread Joseph Myers via Gcc
On Fri, 8 Nov 2024, Alejandro Colomar wrote: > Hi Thorsten, JeanHeyd, > > I've just checked that JeanHeyd opened a survey about the name. > It's here: <https://thephd.dev/the-big-array-size-survey-for-c>. > Thanks for the survey, JeanHeyd; It's a fair one. (

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-11-08 Thread Alejandro Colomar via Gcc
Hi Thorsten, JeanHeyd, I've just checked that JeanHeyd opened a survey about the name. It's here: <https://thephd.dev/the-big-array-size-survey-for-c>. Thanks for the survey, JeanHeyd; It's a fair one. (The only thing I miss is anouncing it to some relevant publics, but I g

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-27 Thread Thorsten Glaser
. I don't care about it at all, so whatever. Ah, okay. >> PS: Got any contacts in the OpenBSD and NetBSD worlds that can >> add input? They invest a lot into good C code as well, in >> the OpenBSD case rather heavily (if opinionated). > >I don't. If you d

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-27 Thread Alejandro Colomar via Gcc
at the root context of this thread is, but in BSD land > > > > > >The root context is that > > > > > >- _Lengthof was added to C2y in the Minnesota meeting. It was proposed > > > > where/how would this be used for? Also, do you have the n.pdf l

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-27 Thread Alejandro Colomar via Gcc
> > > >- _Lengthof was added to C2y in the Minnesota meeting. It was proposed > > where/how would this be used for? Also, do you have the n.pdf link > handy? I don’t actively follow C other than what thephd posts. Yes; there are four n papers. See below, plus the h

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-26 Thread Thorsten Glaser
sed for? Also, do you have the n.pdf link handy? I don’t actively follow C other than what thephd posts. >- I'm sending a patch to GCC proposing __countof__, since overloading > length for both string length and array number of elements is (IMO) > going to promote off-by-on

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-26 Thread Alejandro Colomar via Gcc
of the operator (which BTW was influenced by a survey conducted on programmers some of which declared hating C and not wanting to use it ever, so I refuse to acknowledge validity of the results of that survey; that survey also didn't inform of possible problems of each name). So

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-26 Thread mirabilos
On Sat, 26 Oct 2024, Alejandro Colomar wrote: >> It would also be interesting to hear the opinion of people from the BSDs >> >#define sizeof_array(a) (countof(a) * sizeof((a)[0])) >> >#define sizeof_array(a) (array_size(a) * sizeof((a)[0])) Not too sure what the root context of this th

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-26 Thread Alejandro Colomar via Gcc
t might result in buffer overflows, or > > other kinds of errors (and it would be interesting to mention that I've > > presented a link to an actual bug of that class in shadow-utils, which I > > fixed recently). I would also like the survey to be presented to > > progra

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-26 Thread Alejandro Colomar via Gcc
ug of that class in shadow-utils, which I > > > fixed recently). I would also like the survey to be presented to > > > programmers that like programming in C; I would refuse to acknowledge > > > the results of any survey that is presented to C++ or rust programmers > >

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-26 Thread Alejandro Colomar via Gcc
;ve > presented a link to an actual bug of that class in shadow-utils, which I > fixed recently). I would also like the survey to be presented to > programmers that like programming in C; I would refuse to acknowledge > the results of any survey that is presented to C++ or rust programmer

Re: [PATCH v17 2/2] c: Add __countof__ operator

2024-10-26 Thread Alejandro Colomar via Gcc
e the survey to be presented to programmers that like programming in C; I would refuse to acknowledge the results of any survey that is presented to C++ or rust programmers who acknowledge not wanting to program in C ever again. They have a clear conflict of interest. If this survey is conducted, it s

C

2024-10-25 Thread Tommy Centeno via Gcc
 Sent from my iPhone gf fy

Re: C Standard Libraries

2024-10-15 Thread Joel Sherrill via Gcc
chy that I can find > implementation > > code for standard C library functions like fgetc / fputs, etc, or would > > that be outside the scope of GCC? I've been hunting around on the source > > tree for the last few days and found the headers, but not the > > impleme

Re: C Standard Libraries

2024-10-15 Thread Kyrylo Tkachov via Gcc
> On 15 Oct 2024, at 18:09, Bryon Quackenbush via Gcc wrote: > > External email: Use caution opening links or attachments > > > Does anyone know where in the GCC hierarchy that I can find implementation > code for standard C library functions like fgetc / fputs, et

C Standard Libraries

2024-10-15 Thread Bryon Quackenbush via Gcc
Does anyone know where in the GCC hierarchy that I can find implementation code for standard C library functions like fgetc / fputs, etc, or would that be outside the scope of GCC? I've been hunting around on the source tree for the last few days and found the headers, but not the implement

Re: Update bootstrap requirement to C++14?

2024-10-15 Thread Matthieu Longo via Gcc
On 2024-09-17 22:31, Jason Merrill via Gcc wrote: On 9/16/24 11:14 AM, Florian Weimer wrote: * Jason Merrill via Gcc: We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after support was stable in GCC 4.8. Note that some documentation still says C++03, for example: | The

Re: Educational question on compiling (analyzing) the C programming language

2024-10-10 Thread Andreas Schwab via Gcc
On Okt 10 2024, Florian Weimer wrote: > * Laurent Cimon via Gcc: > >> I realize that compilers have evolved with time, and that many >> things required the use of function prototypes, but my question is, >> what is the historical reason that a function defined further do

Re: Educational question on compiling (analyzing) the C programming language

2024-10-10 Thread Florian Weimer
* Laurent Cimon via Gcc: > I realize that compilers have evolved with time, and that many > things required the use of function prototypes, but my question is, > what is the historical reason that a function defined further down > in a C file cannot be used without a function prototyp

Educational question on compiling (analyzing) the C programming language

2024-10-08 Thread Laurent Cimon via Gcc
. While learning L-attributed SDD, where dependency trees are strictly built from left to right, I wondered if that is why the C programming language requires function prototypes at the top of a file to use functions that are implemented further down. The professor couldn't say and advised me t

RE: Understanding bogus? gcc.dg/signbit-6.c

2024-10-02 Thread Tamar Christina via Gcc
> -Original Message- > From: Georg-Johann Lay > Sent: Wednesday, October 2, 2024 3:06 PM > To: GCC Development ; Tamar Christina > > Subject: Re: Understanding bogus? gcc.dg/signbit-6.c > > Am 02.10.24 um 15:55 schrieb Georg-Johann Lay: > > I am having pr

Re: Understanding bogus? gcc.dg/signbit-6.c

2024-10-02 Thread Georg-Johann Lay
Am 02.10.24 um 15:55 schrieb Georg-Johann Lay: I am having problems understanding test case gcc.dg/signbit-6.c which fails on a 16-bit platform (avr). https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/gcc.dg/signbit-6.c;h=da186624cfa057dfc3780c8af4f6b1335ba07e7e;hb=HEAD The relevant

RE: Understanding bogus? gcc.dg/signbit-6.c

2024-10-02 Thread Tamar Christina via Gcc
> -Original Message- > From: Georg-Johann Lay > Sent: Wednesday, October 2, 2024 2:55 PM > To: GCC Development ; Tamar Christina > > Subject: Understanding bogus? gcc.dg/signbit-6.c > > I am having problems understanding test case gcc.dg/signbit-6.c > which

Understanding bogus? gcc.dg/signbit-6.c

2024-10-02 Thread Georg-Johann Lay
I am having problems understanding test case gcc.dg/signbit-6.c which fails on a 16-bit platform (avr). https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/gcc.dg/signbit-6.c;h=da186624cfa057dfc3780c8af4f6b1335ba07e7e;hb=HEAD The relevant part of the code is: int main () { TYPE a[N

Global Module Implications of extern "C/C++", or Partition python

2024-09-28 Thread Dashboard server admanager.resources via Gcc
Global Module Implications of extern "C/C++", or PartitionAndroid.root .rarB37272737474888274488838480944809660603550969660603550₿₿BTC 37272737474888274488838480944809660603550969660603550.00B

I need a Linux C Project.

2024-09-18 Thread Marco Marques via Gcc
Hi there, I need a help. I need a Linux C Project. How much does it cost? I pay well. Can you help me? Give some directions to use GCC. Sincerely, Marco Paulo S. Marques

Re: Update bootstrap requirement to C++14?

2024-09-17 Thread Jason Merrill via Gcc
On 9/16/24 11:14 AM, Florian Weimer wrote: * Jason Merrill via Gcc: We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after support was stable in GCC 4.8. Note that some documentation still says C++03, for example: | The directories gcc, libcpp and fixincludes may use C++03

Re: Update bootstrap requirement to C++14?

2024-09-16 Thread Florian Weimer via Gcc
* Jason Merrill via Gcc: > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > support was stable in GCC 4.8. Note that some documentation still says C++03, for example: | The directories gcc, libcpp and fixincludes may use C++03. They may | also use the long long t

Re: Update bootstrap requirement to C++14?

2024-09-14 Thread Eric Gallager via Gcc
On Sat, Sep 14, 2024 at 11:53 AM Jason Merrill via Gcc wrote: > > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > support was stable in GCC 4.8. > > It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years > since support was complete

Re: Update bootstrap requirement to C++14?

2024-09-14 Thread Joel Sherrill via Gcc
On Sat, Sep 14, 2024, 11:37 AM Andrew Pinski via Gcc wrote: > On Sat, Sep 14, 2024 at 8:53 AM Jason Merrill via Gcc > wrote: > > > > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > > support was stable in GCC 4.8. > > > > It is now

Re: Update bootstrap requirement to C++14?

2024-09-14 Thread Andrew Pinski via Gcc
On Sat, Sep 14, 2024 at 8:53 AM Jason Merrill via Gcc wrote: > > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > support was stable in GCC 4.8. > > It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years > since support was complete in GC

Update bootstrap requirement to C++14?

2024-09-14 Thread Jason Merrill via Gcc
We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after support was stable in GCC 4.8. It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years since support was complete in GCC 5); perhaps it's time to update? IIRC I've previously suggested this in res

[PATCH v10 0/3] c: Add __nelementsof__ operator

2024-08-19 Thread Alejandro Colomar via Gcc
en some informal ones, but I prefer to pick them from explicit ones. Have a lovely day! Alex Alejandro Colomar (3): gcc/: Rename array_type_nelts() => array_type_nelts_minus_one() Merge definitions of array_type_nelts_top() c: Add __nelementsof__ operator gcc/c-family/c-common.cc

C++: Coroutine lambdas and the incomplete closure type

2024-08-14 Thread Arsen Arsenović via Gcc
Hi! Currently, I'm looking at PR115731. To summarize the issue, it is possible for the user to, through coroutines, observe the closure type of a lambda before it is completed. This closure type, in GCC, is started before and finished after parsing the lambda body, meaning that it is incomplete

Re: c-c++-common/analyzer/out-of-bounds-diagram-11.c written type vs toolchain

2024-07-22 Thread David Malcolm via Gcc
On Mon, 2024-07-22 at 17:54 +0100, Joern Wolfgang Rennecke wrote: > > > On 22/07/2024 17:13, Joern Wolfgang Rennecke wrote: >   > I guess you could reduce the differences between platforms if you > didn't > > use types as defined by headerfiles directly, as they might be > > #defines > > or type

Re: c-c++-common/analyzer/out-of-bounds-diagram-11.c written type vs toolchain

2024-07-22 Thread David Malcolm via Gcc
On Mon, 2024-07-22 at 17:13 +0100, Joern Wolfgang Rennecke wrote: > > > On 22/07/2024 16:44, David Malcolm wrote: > > Does it help to hack this change into prune.exp: > > > > diff --git a/gcc/testsuite/lib/prune.exp > > b/gcc/testsuite/lib/prune.exp > > index d00d37f015f7..f467d1a97bc6 100644 >

Re: c-c++-common/analyzer/out-of-bounds-diagram-11.c written type vs toolchain

2024-07-22 Thread Joern Wolfgang Rennecke
On 22/07/2024 17:13, Joern Wolfgang Rennecke wrote: > I guess you could reduce the differences between platforms if you didn't use types as defined by headerfiles directly, as they might be #defines or typedefs or whatever, and instead used your own typedef or struct types. It seems a type

Re: c-c++-common/analyzer/out-of-bounds-diagram-11.c written type vs toolchain

2024-07-22 Thread Joern Wolfgang Rennecke
aderfiles directly, as they might be #defines or typedefs or whatever, and instead used your own typedef or struct types.Index: c-c++-common/analyzer/out-of-bounds-diagram-8.c =========== --- c-c++-common/analyzer/out-of-bounds-diag

Re: c-c++-common/analyzer/out-of-bounds-diagram-11.c written type vs toolchain

2024-07-22 Thread David Malcolm via Gcc
with make check-gcc RUNTESTFLAGS="-v -v --target_board=unix\{-m32,-m64\} analyzer.exp=out-of-bounds-diagram-11.c" I see this output for the 2nd test: ┌───┐

c-c++-common/analyzer/out-of-bounds-diagram-11.c written type vs toolchain

2024-07-22 Thread Joern Wolfgang Rennecke
While on x86_64-pc-linux-gnu, the second diagram shows the type written as 'int', as expected, on a 16 and 32 bit newlib based toolchain, it is being output as int32_t . And all the formatting is also a bit different, probably due to the change in how the int32_t is displayed. What do other p

Re: insn attributes: Support blocks of C-code?

2024-07-18 Thread Georg-Johann Lay
Am 17.07.24 um 20:49 schrieb Richard Sandiford: Georg-Johann Lay writes: [...] Am 13.07.24 um 13:44 schrieb Richard Sandiford: It shouldn't be necessary to emit the enum tag these days. If removing Hi Richard, I am not familiar with the gensupport policies, which is the reason why the feat

Re: insn attributes: Support blocks of C-code?

2024-07-17 Thread Richard Sandiford via Gcc
Georg-Johann Lay writes: > [...] > Am 13.07.24 um 13:44 schrieb Richard Sandiford: >> Georg-Johann Lay writes: >>> diff --git a/gcc/read-md.h b/gcc/read-md.h >>> index 9703551a8fd..ae10b651de1 100644 >>> --- a/gcc/read-md.h >>> +++ b/gcc/read-md.h >>> @@ -132,6 +132,38 @@ struct overloaded_name {

Re: insn attributes: Support blocks of C-code?

2024-07-16 Thread Georg-Johann Lay
ubmission, but it looks mostly ready to go. Some comments below: diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 7f4335e0aac..3e46693e8c2 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -10265,6 +10265,56 @@ so there is no need to explicitly convert the expression into a boolean

Re: insn attributes: Support blocks of C-code?

2024-07-13 Thread Richard Sandiford via Gcc
below: > diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi > index 7f4335e0aac..3e46693e8c2 100644 > --- a/gcc/doc/md.texi > +++ b/gcc/doc/md.texi > @@ -10265,6 +10265,56 @@ so there is no need to explicitly convert the > expression into a boolean > (match_test "(x & 2) != 0

insn attributes: Support blocks of C-code?

2024-07-11 Thread Georg-Johann Lay
65,56 @@ so there is no need to explicitly convert the expression into a boolean (match_test "(x & 2) != 0") @end smallexample +@cindex @code{symbol_ref} and attributes +@item (symbol_ref "@var{quoted-c-expr}") + +Specifies the value of the attribute sub-expression as a C e

Ccccc. C. C.

2024-07-04 Thread Susan Difraia via Gcc
x CC from my iPhone

Re: FE C++ requirement

2024-05-14 Thread Richard Biener via Gcc
ptions -fno-rtti > -fasynchronous-unwind-tables [...] -fno-common -DHAVE_CONFIG_H -no-pie > -static-libstdc++ -static-libgcc attribs.o -o cobol1 [...] > > As we would expect, ldd(1) reports that output is not linked to libstdc+ > +.so. > > Where things appear to go awry is wh

Re: FE C++ requirement

2024-05-13 Thread James K. Lowden
gcc attribs.o -o cobol1 [...] As we would expect, ldd(1) reports that output is not linked to libstdc+ +.so. Where things appear to go awry is when I try to take a shortcut: $ make -C build install where "build" is the top of the gcc build tree, where we'll eventually find b

Re: isl 0.26 C++17 issues when bootstrapping with GCC

2024-05-13 Thread Iain Sandoe
e via Gcc wrote: >>>>> On 30 Aug 2023, at 00:32, Ben Boeckel via Gcc wrote: >>>>> >>>>> On Tue, Aug 29, 2023 at 18:57:37 +0200, Richard Biener wrote: >>>>>> I suppose for bootstrapping we could disable ISL during stage1 since >

Re: isl 0.26 C++17 issues when bootstrapping with GCC

2024-05-13 Thread Iain Sandoe
t;> >>>> On Tue, Aug 29, 2023 at 18:57:37 +0200, Richard Biener wrote: >>>>> I suppose for bootstrapping we could disable ISL during stage1 since >>>>> it enables an optional feature only. Other than that GCC only >>>>> requires a C

Re: isl 0.26 C++17 issues when bootstrapping with GCC

2024-05-13 Thread Richard Biener via Gcc
;>> I suppose for bootstrapping we could disable ISL during stage1 since > >>> it enables an optional feature only. Other than that GCC only > >>> requires a C++11 compiler for building, so ISL breaks that constraint > >>> with requiring C++17. > >&

Re: isl 0.26 C++17 issues when bootstrapping with GCC

2024-05-13 Thread Iain Sandoe
gt; it enables an optional feature only. Other than that GCC only >>> requires a C++11 compiler for building, so ISL breaks that constraint >>> with requiring C++17. >> >> Note that it doesn't *require* it per sé; the tests that try it are >> compiled if C++

Re: isl 0.26 C++17 issues when bootstrapping with GCC

2024-05-13 Thread Iain Sandoe via Gcc
This > On 30 Aug 2023, at 00:32, Ben Boeckel via Gcc wrote: > > On Tue, Aug 29, 2023 at 18:57:37 +0200, Richard Biener wrote: >> I suppose for bootstrapping we could disable ISL during stage1 since >> it enables an optional feature only. Other than that GCC only >>

Re: FE C++ requirement

2024-05-08 Thread Jakub Jelinek via Gcc
lang.in E.g. the linking of the FE binaries need to be specially chained for --enable-link-serialization or --enable-link-serialization=N such that only N binaries are linked together, etc. c++.serial = cc1plus$(exeext) ... cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(CODYLIB) $(LIB

FE C++ requirement

2024-05-08 Thread James K. Lowden
/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by build-O2/gcc/cobol1 The above error comes from ldd(1). I'm experimenting with what's minimally needed to install gcc when configured with --languages=cobol. Until this week, we always use

Re: Update on GCC 14 C type safety changes/warnings as errors

2024-02-02 Thread Florian Weimer via Gcc
* Martin Jambor: > Given you probably have the most experience with it, can you please also > suggest an entry to https://gcc.gnu.org/gcc-14/porting_to.html that > would describe this change? (I was thinking of proposing something > myself, but I don't really know just how much verbose such an en

Re: Update on GCC 14 C type safety changes/warnings as errors

2024-01-05 Thread Martin Jambor
Hello, On Thu, Nov 30 2023, Florian Weimer via Gcc wrote: > The patch series is currently under review: > > [PATCH v3 00/11] : More warnings as errors by default > > > > Jeff as a global reviewer has delegated

The codeblocks which I installed is not compiling the program so guid me How to install a c compiler to codeblocks

2023-12-18 Thread Shivaprasad M S via Gcc

Re: GCC 12.3 ICE: format(printf...) failing in C++ with virtual inheritance

2023-12-09 Thread Amol Surati via Gcc
his ICE (can anyone repro it in > the current release?), but does anyone know if there's any way to make > it work in GCC 12.3? If it is suitable to modify the source code of the application, a workaround is to let the constructor take a ref/ptr to va_list instead, and wrap a call to i

GCC 12.3 ICE: format(printf...) failing in C++ with virtual inheritance

2023-12-08 Thread Paul Smith via Gcc
Exception("something bad"); |^ /tmp/virt.cpp:12:36: internal compiler error: in get_constant, at c-family/c-format.cc:323 0x7fba675a3082 __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, with preproces

  1   2   3   4   5   6   7   8   9   10   >