Re: #pragma once behavior

2024-09-08 Thread Michael Clark via Gcc
ecause constant search configuration relative identity sounds better. as they could be defined to be different identities wrt #pragma once. it's the semantically safer option. and the canonical example that fails (same content, different path, same mtime) would succeed with this choice. pick ho

Re: #pragma once behavior

2024-09-07 Thread Jeremy Rifkin
Hi, > IIRC it’s already deprecated It appears it was undeprecated in 2003. > What can pragma once do that include guards can‘t? What’s the issue > to solve? Include guard collisions? There is nothing #pragma once does that include guards can't. The reason people turn to it is b

Re: #pragma once behavior

2024-09-07 Thread Eric Gallager via Gcc
; > I don't have a good answer for such a case. Of course, no matter how one > > approaches #pragma once there will be cases that aren't handled. > > > > The criteria to optimize for, imo, is which has the most clear failure > > mode. Contents happening match c

Re: #pragma once behavior

2024-09-07 Thread Richard Biener via Gcc
> Am 07.09.2024 um 07:27 schrieb Jeremy Rifkin : > >  >> >> This is why I said what is the a same file if you can't rely on inodes >> working? > > I don't have a good answer for such a case. Of course, no matter how one > approaches #pragm

Re: #pragma once behavior

2024-09-06 Thread Jeremy Rifkin
> This is why I said what is the a same file if you can't rely on inodes > working?  I don't have a good answer for such a case. Of course, no matter how one approaches #pragma once there will be cases that aren't handled. The criteria to optimize for, imo, is which has t

Re: #pragma once behavior

2024-09-06 Thread Andrew Pinski via Gcc
ndif (and > > that is documented here: > > https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html) so does > > it make sense to really standardize `#pramga once` here or just push > > other implementations to add a similar optimization instead? > > > > Thanks, > > A

Re: #pragma once behavior

2024-09-06 Thread Jeremy Rifkin
ad? > > Thanks, > Andrew Pinski > >> >> Cheers, >> Jeremy >> >> On Sep 6 2024, at 12:25 am, Andrew Pinski wrote: >> >> > On Thu, Sep 5, 2024 at 10:04 PM Jeremy Rifkin wrote: >> >> >> >> Hello, >> >&

Re: #pragma once behavior

2024-09-06 Thread Jeremy Rifkin
emy On Sep 6 2024, at 8:26 am, Ben Boeckel wrote: > On Fri, Sep 06, 2024 at 00:03:23 -0500, Jeremy Rifkin wrote: >> Hello, >> >> I'm looking at #pragma once behavior among the major C/C++ compilers as >> part of a proposal paper for standardizing #pragma once. (Thi

Re: #pragma once behavior

2024-09-06 Thread Andrew Pinski via Gcc
2:25 am, Andrew Pinski wrote: > > > On Thu, Sep 5, 2024 at 10:04 PM Jeremy Rifkin wrote: > >> > >> Hello, > >> > >> I'm looking at #pragma once behavior among the major C/C++ compilers as > >> part of a proposal paper for standardizi

Re: #pragma once behavior

2024-09-06 Thread Jeremy Rifkin
o approach this with a focused paper on just providing a clear set of mechanics for #pragma once. I do recognize the uphill battle and legitimate concern about "blessing" an unreliable feature. My thesis is that #pragma once is unreliable today because every implementation approaches it

Re: #pragma once behavior

2024-09-06 Thread Jeremy Rifkin
fickleness of mtime? Cheers, Jeremy On Sep 6 2024, at 12:25 am, Andrew Pinski wrote: > On Thu, Sep 5, 2024 at 10:04 PM Jeremy Rifkin wrote: >> >> Hello, >> >> I'm looking at #pragma once behavior among the major C/C++ compilers as >> part of a proposa

Re: #pragma once behavior

2024-09-06 Thread Ben Boeckel via Gcc
On Fri, Sep 06, 2024 at 00:03:23 -0500, Jeremy Rifkin wrote: > Hello, > > I'm looking at #pragma once behavior among the major C/C++ compilers as > part of a proposal paper for standardizing #pragma once. (This is > apparently a very controversial topic) > > To put m

Re: #pragma once behavior

2024-09-05 Thread Martin Uecker via Gcc
m was that the regular form is not reliable and difficult to standardize any specific rules and that the form with ID does not add much value over traditional include guards. Martin Am Freitag, dem 06.09.2024 um 00:03 -0500 schrieb Jeremy Rifkin: > Hello, > > I'm looking at #p

Re: #pragma once behavior

2024-09-05 Thread Andrew Pinski via Gcc
On Thu, Sep 5, 2024 at 10:04 PM Jeremy Rifkin wrote: > > Hello, > > I'm looking at #pragma once behavior among the major C/C++ compilers as > part of a proposal paper for standardizing #pragma once. (This is > apparently a very controversial topic) > > To put my ques

#pragma once behavior

2024-09-05 Thread Jeremy Rifkin
Hello, I'm looking at #pragma once behavior among the major C/C++ compilers as part of a proposal paper for standardizing #pragma once. (This is apparently a very controversial topic) To put my question up-front: Would GCC ever be open to altering its #pragma once behavior to bring it mo

Re: #pragma once

2006-08-14 Thread Ian Lance Taylor
Drgt <[EMAIL PROTECTED]> writes: > It seems, that "#pragma once" isn't in ISO, and will never be, especially > because it is Microsoft (am I right ?) C extension. > (http://gcc.gnu.org/ml/gcc/2004-06/msg01887.html) I believe that gcc was actually the first compi

Re: #pragma once

2006-08-13 Thread Andrew Pinski
On Sun, 2006-08-13 at 19:48 +0300, Drgt wrote: > Hi. > > It seems, that "#pragma once" isn't in ISO, and will never be, especially > because it is Microsoft (am I right ?) C extension. > (http://gcc.gnu.org/ml/gcc/2004-06/msg01887.html) #pragma once has not been re

Re: #pragma once

2006-08-13 Thread Robert Dewar
Drgt wrote: Hi. It seems, that "#pragma once" isn't in ISO, and will never be, especially because it is Microsoft (am I right ?) C extension. Why not implement it yourself and propose a patch.

#pragma once

2006-08-13 Thread Drgt
Hi. It seems, that "#pragma once" isn't in ISO, and will never be, especially because it is Microsoft (am I right ?) C extension. (http://gcc.gnu.org/ml/gcc/2004-06/msg01887.html) But I still asking GCC developers, that this simple-in-use thing would be in GCC, and you not "