Re: lambda coding style
> "Jason" == Jason Merrill via Gcc writes: Jason> I think we probably want the same formatting for lambdas in function Jason> argument lists, e.g. Jason> algorithm ([] (parms) Jason> { Jason> return foo; Jason> }); Jason> Any other opinions? FWIW gdb did pretty much this same thing. Our rules are documented here: https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Indentation_of_lambdas_as_parameters There's a special case in here where a call takes a single lambda as the last argument -- gdb indents that in a more block-like way. Tom
Re: lambda coding style
Hi, On Wed, Jan 10 2024, Jason Merrill via Gcc wrote: > What formatting style do we want for non-trivial lambdas in GCC sources? > I'm thinking the most consistent choice would be > > auto l = [&] (parms) // space between ] ( >{ // brace on new line, indented two spaces > return stuff; >}; > > By default, recent emacs lines up the { with the previous line, like an > in-class function definition; I talked it into the above indentation with > > (defun lambda-offset (elem) >(if (assq 'inline-open c-syntactic-context) '+ 0)) > (add-to-hook 'c++-mode-hook '(c-set-offset 'inlambda 'lambda-offset)) Is this really add-to-hook and not add-hook? Thanks! Martin > > I think we probably want the same formatting for lambdas in function > argument lists, e.g. > > algorithm ([] (parms) >{ > return foo; >}); > > Any other opinions? > > Jason
Re: lambda coding style
On 1/11/24 12:48, Martin Jambor wrote: On Wed, Jan 10 2024, Jason Merrill via Gcc wrote: What formatting style do we want for non-trivial lambdas in GCC sources? I'm thinking the most consistent choice would be auto l = [&] (parms) // space between ] ( { // brace on new line, indented two spaces return stuff; }; By default, recent emacs lines up the { with the previous line, like an in-class function definition; I talked it into the above indentation with (defun lambda-offset (elem) (if (assq 'inline-open c-syntactic-context) '+ 0)) (add-to-hook 'c++-mode-hook '(c-set-offset 'inlambda 'lambda-offset)) Is this really add-to-hook and not add-hook? Oops! add-to-hook is a custom variant I wrote back in like 1992; for add-hook you'll want (add-hook 'c++-mode-hook '(lambda () (c-set-offset 'inlambda 'lambda-offset))) Jason
Sourceware Open Office, Friday January 12, 18:00 UTC
Happy new year! This Friday will be the first Sourceware Open Office of 2024. Join us this Friday, January 12, in #overseers on irc.libera.chat from 18:00 till 19:00 UTC. For any questions or ideas about any Sourceware service and/or integration of cgit, bugzilla, mailinglists, snapshots, mirrors, archiving, gitsigur, secure supply chains, public-inbox, b4, patchwork, bbb, buildbot (now including a risc-v board), etc. For this meeting we will also have a BBB meeting room: https://bbb.sfconservancy.org/b/mar-aom-dmo-fko (But the real discussion will be in the irc channel) If you want to run your own meetings for any Sourceware project you can create your own account at https://bbb.sfconservancy.org/b/signup which we can then activate for you. Note: Anyone is able to join a meeting, accounts are only required to create new meetings. Of course you are welcome to drop into the #overseers channel at any time and we can also be reached through email and bugzilla: https://sourceware.org/mission.html#organization Thanks to the Conservancy we now also have a donation page: https://sourceware.org/donate.html to fund accelerating tasks the community feels most useful. More details about our relationship with the Conservancy here: https://sfconservancy.org/blog/2023/nov/27/sourceware-thanks-conservancy/ If you aren't already and want to keep up to date on Sourceware infrastructure services then please also subscribe to the overseers mailinglist. https://sourceware.org/mailman/listinfo/overseers We are also on the fediverse these days: https://fosstodon.org/@sourceware The Sourceware Project Leadership Committee also meets once a month to discuss all community input. The committee will set priorities and decide how to spend any funds, negotiate with hardware and service partners, create budgets together with the Conservancy, or decides when a new fundraising campaign is needed. Up till now we have been able to add new services without needing to use any of the collected funds. Our hardware partners have also been very generous with providing extra servers when requested. The current committee includes Frank Ch. Eigler, Christopher Faylor, Ian Kelling, Ian Lance Taylor, Tom Tromey, Jon Turney, Mark J. Wielaard and Elena Zannoni.
gcc-11-20240111 is now available
Snapshot gcc-11-20240111 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-20240111/ and on various mirrors, see https://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 11 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch releases/gcc-11 revision 6c4882dd9453d096429cfb4652f25915a931e155 You'll find: gcc-11-20240111.tar.xz Complete GCC SHA256=0eb7dcf1940e8792110e479e0e0f269cef077bf1d23a7bb4aebc629ca7e7b468 SHA1=2893e1b687005e5ccc64663d068db7e7196a Diffs from 11-20240104 are available in the diffs/ subdirectory. When a particular snapshot is ready for public consumption the LATEST-11 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.