Re: C2X Proposal, merge '.' and '->' C operators

2019-12-26 Thread J Decker
On Sat, Dec 21, 2019 at 11:11 AM Allan Sandfeld Jensen wrote: > On Monday, 16 December 2019 14:51:38 CET J Decker wrote: > > Here's the gist of what I would propose... > > https://gist.github.com/d3x0r/f496d0032476ed8b6f980f7ed31280da > > > > In C, there are two operat

Re: C2X Proposal, merge '.' and '->' C operators

2019-12-20 Thread J Decker
On Fri, Dec 20, 2019 at 12:03 PM J Decker wrote: > > > On Fri, Dec 20, 2019 at 11:59 AM J Decker wrote: > >> >> >> On Tue, Dec 17, 2019 at 2:53 AM Florian Weimer >> wrote: >> >>> * J. Decker: >>> >>> > Here's

Re: C2X Proposal, merge '.' and '->' C operators

2019-12-20 Thread J Decker
On Fri, Dec 20, 2019 at 11:59 AM J Decker wrote: > > > On Tue, Dec 17, 2019 at 2:53 AM Florian Weimer wrote: > >> * J. Decker: >> >> > Here's the gist of what I would propose... >> > https://gist.github.com/d3x0r/f496d0032476ed8b6f980f7ed31280

Re: C2X Proposal, merge '.' and '->' C operators

2019-12-20 Thread J Decker
On Tue, Dec 17, 2019 at 2:53 AM Florian Weimer wrote: > * J. Decker: > > > Here's the gist of what I would propose... > > https://gist.github.com/d3x0r/f496d0032476ed8b6f980f7ed31280da > > > > In C, there are two operators . and -> used to access member

Re: C2X Proposal, merge '.' and '->' C operators

2019-12-16 Thread J Decker
s... } int main( void ) { f(); return 0; } ``` I haven't built the testsuite... On Mon, Dec 16, 2019 at 5:51 AM J Decker wrote: > Here's the gist of what I would propose... > https://gist.github.com/d3x0r/f496d0032476ed8b6f980f7ed31280da > > In C, there are two opera

C2X Proposal, merge '.' and '->' C operators

2019-12-16 Thread J Decker
Here's the gist of what I would propose... https://gist.github.com/d3x0r/f496d0032476ed8b6f980f7ed31280da In C, there are two operators . and -> used to access members of struct and union types. These operators are specified such that they are always paired in usage; for example, if the left hand

Re: would you review the srcy programming language?

2018-03-29 Thread J Decker
Somewhat like assembly meets c99 /javascript with maybe an extended preprocessor macro system (#declr? ) pointers rarely contain a single value, they either reference an array, or a group of values. In the case of the latter, the pointerVarName.FieldName pair specifies to get the value, and then

A variation of constructor attribute

2015-08-21 Thread J Decker
It's nice that GCC has included a constructor attribute, but it doesn't work in complex scenarios. I was considering tinkering with adding a 'initializer' and '?exiter' or maybe 'deinitializer'? (not sure what to name the other side) But on to the primary... __attribute((initializer(priority)))

Re: signed/unsigned comparison warning level

2010-09-27 Thread J Decker
comparison. unsigned int x; int y; if ((int)x y) -Rick -Original message- From: J Decker d3c...@gmail.com To: Ian Lance Taylor i...@google.com Cc: gcc@gcc.gnu.org Sent: Mon, Sep 27, 2010 05:51:56 GMT+00:00 Subject: Re: signed/unsigned comparison warning level The standards did

signed/unsigned comparison warning level

2010-09-26 Thread J Decker
Can the severity of signed/unsigned comparisons be raised, since GCC does not properly handle the comparisons. Every example below is false compiled with gcc 4.5.0 int main() { int s = -2; unsigned int u = 0xFFFDU; if( s u ) printf( okay\n );

Re: signed/unsigned comparison warning level

2010-09-26 Thread J Decker
The standards did not leave this open.  They define precisely what is supposed to happen. Really? I'll have to drop this whole lobbying effort then. That makes me sad that they didn't define it to be comparing of the numbers where there are overlaps in signed and unsigned instead of causing

Re: array of pointer to function support in GNU C

2010-09-16 Thread J Decker
On Wed, Sep 15, 2010 at 11:15 PM, ir_idjit ren_zokuke...@hotmail.com wrote: i've been writing bits of codes where it requires to have an array or pointers to functions, so the decision of which function to execute is indexed... (i know, a lot of you will say well, that's a VERY specific of a

Re: Guidance needed: hi-level steps to track an object until its destruction

2010-08-29 Thread J Decker
Just out of curiosity - isn't this what C# does with objects? would it perhaps be something like that in how mcs (mono) builds objects and tracks their lifespan? On Sun, Aug 29, 2010 at 4:43 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: I am not sure that is easily feasible. I would believe

GCC 4.5.0 Reports invalid warning

2010-07-15 Thread J Decker
This is the code. -- #define PointerA struct a * void f( PointerA ); typedef struct a * PA; struct a { int x; }; void f( PA a ) { } - This is the output warning: 'struct a' declared inside parameter list warning: its scope is

Re: GCC 4.5.0 Reports invalid warning

2010-07-15 Thread J Decker
On Thu, Jul 15, 2010 at 5:32 PM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 16/07/2010 00:59, J Decker wrote: -- #define PointerA struct a * void f( PointerA ); typedef struct a * PA; struct a { int x; }; void f( PA

Re: GCC 4.5.0 Reports invalid warning

2010-07-15 Thread J Decker
, 2010 at 5:21 PM, J Decker d3c...@gmail.com wrote: On Thu, Jul 15, 2010 at 5:32 PM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 16/07/2010 00:59, J Decker wrote: -- #define PointerA struct a * void f( PointerA ); typedef struct a * PA; struct a { int x

Re: GCC 4.5.0 Reports invalid warning

2010-07-15 Thread J Decker
On Thu, Jul 15, 2010 at 6:08 PM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 16/07/2010 01:31, J Decker wrote: Oh not so bad then, I can just add at the beginning... typedef struct a *NeverUsedDefinition; and now it's happy?  And that makes good coding how?  No, that would be bad coding