Re: RFC: Bugzilla keyword "interp" where it is not clear if a program is standard-conforming or not

2025-02-09 Thread Richard Biener via Gcc
On Mon, Feb 10, 2025 at 8:19 AM Andre Vehreschild  wrote:
>
> Hi all,
>
> I don't like the new keyword. Could we do "stdcomp" (for "standard compliant")
> or something like that? When a keyword allows a question mark, I would even 
> add
> that, i.e.. like "stdcomp?". Or when we like to go with interp then at least
> add "std", i.e. "stdinterp". "interp" alone to me is too near to "interpreter"
> and could collide with searches should there be an interpreter in the gcc 
> suite.
>
> Sorry, for the new way in the discussion.

We have need-bisection and other need-, so iff then maybe a need-stdchk for
cases compliance is unclear?  The fact that a testcase is (non-)compliant is
also not telling anything about the bug reported, unlike rejects-valid
or ice-on-invalid,
so it does not help in bug searches.

Richard.

> - Andre
>
> On Sun, 9 Feb 2025 09:00:47 -0800
> Jerry D  wrote:
>
> > On 2/9/25 1:07 AM, Thomas Koenig wrote:
> > > Hello world,
> > >
> > > looking at a few Fortran bug reports, I found some cases where
> > > it was not clear if the program in question was standard-conforming
> > > or not.  I would propose to add a keyword for that, tentatively
> > > called "interp".
> > >
> > > Comments? Suggestions for a different name?  Should I just go ahead
> > > and create it?
> > >
> > > Best regards
> > >
> > >  Thomas
> >
> > Your suggestion is reasonable and it happens often enough to be useful.
> > It does not have to be an official interpretation needed necessarily.
> > Sometimes we resolve these via discussion and comparison to other compilers.
> >
> > -- Jerry
>
>
> --
> Andre Vehreschild * Email: vehre ad gmx dot de


Re: How "()" works and why

2025-02-09 Thread Nicholas Vinson via Gcc




On 2/9/25 10:38, саша савельев wrote:


To whom it may concern
  
  
Me and my classmates found strange behaviour of «()» (in C++) on IT lesson, but our teacher couldn’t anwer us why it works in this way. After, we had tryed to find out by ourselfs, but we found nothing. We understood HOW it works, but not WHY. Could you explane it for us?
  
std::cout << (std::cout.fixed, std::cout.precision(100), acos(-1));

This code will call all functions in order (we think any combinations of 
functions will be called in order, so might its behavior is defined), but «()» 
will return only last value (return from acos(-1)).


What you are describing is not the behavior of '(expression)', but the 
behavior of the comma operator 
(https://en.wikipedia.org/wiki/Comma_operator).


  
  
Alexander and his friends




Re: RFC: Bugzilla keyword "interp" where it is not clear if a program is standard-conforming or not

2025-02-09 Thread Andre Vehreschild via Gcc
Hi all,

I don't like the new keyword. Could we do "stdcomp" (for "standard compliant")
or something like that? When a keyword allows a question mark, I would even add
that, i.e.. like "stdcomp?". Or when we like to go with interp then at least
add "std", i.e. "stdinterp". "interp" alone to me is too near to "interpreter"
and could collide with searches should there be an interpreter in the gcc suite.

Sorry, for the new way in the discussion.

- Andre

On Sun, 9 Feb 2025 09:00:47 -0800
Jerry D  wrote:

> On 2/9/25 1:07 AM, Thomas Koenig wrote:
> > Hello world,
> > 
> > looking at a few Fortran bug reports, I found some cases where
> > it was not clear if the program in question was standard-conforming
> > or not.  I would propose to add a keyword for that, tentatively
> > called "interp".
> > 
> > Comments? Suggestions for a different name?  Should I just go ahead
> > and create it?
> > 
> > Best regards
> > 
> >  Thomas  
> 
> Your suggestion is reasonable and it happens often enough to be useful. 
> It does not have to be an official interpretation needed necessarily. 
> Sometimes we resolve these via discussion and comparison to other compilers.
> 
> -- Jerry


-- 
Andre Vehreschild * Email: vehre ad gmx dot de 


gcc-15-20250209 is now available

2025-02-09 Thread GCC Administrator via Gcc
Snapshot gcc-15-20250209 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/15-20250209/
and on various mirrors, see https://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 15 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch master 
revision 22e30d60b971eed9a4754ea920d05b1b7e89090a

You'll find:

 gcc-15-20250209.tar.xz   Complete GCC

  SHA256=12ef13124a589fd3504056363d898659f7c91883f5b591bc1e8af87877d11e2a
  SHA1=8db1d9f08d173b0db79846fd92208212f69dd673

Diffs from 15-20250202 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-15
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


Re: Classes Implicitly Declared

2025-02-09 Thread Jonathan Wakely via Gcc
On Sun, 9 Feb 2025, 00:24 Frederick Virchanza Gotham via Gcc, <
gcc@gcc.gnu.org> wrote:

> As the GNU compiler make its way through a translation unit, more and
> more classes get declared. So for each translation unit, the compiler
> maintains a list of what types it has seen so far.
>
> Could someone please point me to where in the GNU g++ source code I
> will find this container object? What's the name of the container, and
> in what source file is it defined?
>
> I want to add 'std::vector' to the container implicitly so that we can
> write a translation unit without needing to do "#include ". My
> end game idea is to add forward declarations for all standard library
> classes.
>

Why? That seems like it will just permit invalid code.

Why not use 'import std;' instead?


Re: On master, with checking=all, I get dozens of fails for g++, already for months on end.

2025-02-09 Thread Nathaniel Shead via Gcc
On Fri, Feb 07, 2025 at 10:57:19AM +0100, Toon Moene wrote:
> Compare a standard gcc build:
> 
> https://gcc.gnu.org/pipermail/gcc-testresults/2025-February/837664.html
> 
> with this one using checking=all:
> 
> https://gcc.gnu.org/pipermail/gcc-testresults/2025-February/837708.html
> 
> Other languages do not seem to be affected.
> 
> A sample:
> 
> FAIL: g++.dg/modules/xtreme-header-8.C -std=c++17 (internal compiler error:
> Segmentation fault)
> FAIL: g++.dg/modules/xtreme-header-8.C -std=c++17 (test for excess errors)
> FAIL: g++.dg/modules/xtreme-header-8.C module-cmi xstd (gcm.cache/xstd.gcm)
> FAIL: g++.dg/modules/xtreme-header-8.C -std=c++2a (internal compiler error:
> Segmentation fault)
> FAIL: g++.dg/modules/xtreme-header-8.C -std=c++2a (test for excess errors)
> FAIL: g++.dg/modules/xtreme-header-8.C module-cmi xstd (gcm.cache/xstd.gcm)
> 
> Hope this is useful.
> 
> Kind regards,
> 
> -- 
> Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
> Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
> 

Thanks, I've reduced the issue with the modules testcases and created
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118807 for this.

Nathaniel


How "()" works and why

2025-02-09 Thread саша савельев

To whom it may concern 
 
 
Me and my classmates found strange behaviour of «()» (in C++) on IT lesson, but 
our teacher couldn’t anwer us why it works in this way. After, we had tryed to 
find out by ourselfs, but we found nothing. We understood HOW it works, but not 
WHY. Could you explane it for us?
 
std::cout << (std::cout.fixed, std::cout.precision(100), acos(-1));
This code will call all functions in order (we think any combinations of 
functions will be called in order, so might its behavior is defined), but «()» 
will return only last value (return from acos(-1)).
 
 
Alexander and his friends

RFC: Bugzilla keyword "interp" where it is not clear if a program is standard-conforming or not

2025-02-09 Thread Thomas Koenig via Gcc

Hello world,

looking at a few Fortran bug reports, I found some cases where
it was not clear if the program in question was standard-conforming
or not.  I would propose to add a keyword for that, tentatively
called "interp".

Comments? Suggestions for a different name?  Should I just go ahead
and create it?

Best regards

Thomas


Re: RFC: Bugzilla keyword "interp" where it is not clear if a program is standard-conforming or not

2025-02-09 Thread Jerry D via Gcc

On 2/9/25 1:07 AM, Thomas Koenig wrote:

Hello world,

looking at a few Fortran bug reports, I found some cases where
it was not clear if the program in question was standard-conforming
or not.  I would propose to add a keyword for that, tentatively
called "interp".

Comments? Suggestions for a different name?  Should I just go ahead
and create it?

Best regards

 Thomas


Your suggestion is reasonable and it happens often enough to be useful. 
It does not have to be an official interpretation needed necessarily. 
Sometimes we resolve these via discussion and comparison to other compilers.


-- Jerry