- [OT] Re: Variable declaration syntax - 11 Updates
- why is "std::string propBulkRow = 0;" legal ? - 1 Update
Melzzzzz <Melzzzzz@zzzzz.com>: Apr 11 09:19PM > Keep searching for others that can fully support C11 threads, atomics > and membars. I would really appreciate it. Perhaps I am totally missing > something. Seems that gcc/clang/icc folks wait for glibc implementors to support it ;( C++11 threads are there, just not C ;( -- press any key to continue or any other to quit... |
jameskuyper@verizon.net: Apr 11 02:36PM -0700 On Wednesday, April 11, 2018 at 4:48:55 PM UTC-4, Scott Lurndal wrote: > Melzzzzz <Melzzzzz@zzzzz.com> writes: ... > Ah, but change the 'thrd_' prefix to 'pthread_' and it > will work (at least on unix and linux systems). > #define thrd_ pthread_ Did you try that? I hope you realize that it doesn't actually work. Macro names are matched to entire tokens, and in thrd_create, thrd_ is only a part of the thrd_create token. |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 02:43PM -0700 On 4/11/2018 2:14 PM, Chris M. Thomasson wrote: >> and inline assembly. >> You also need to include <pthread.h> instead of <thread.h>. > You are right about that. I feel the need to explicitly point out that I have not tried out adding a: #define thrd_ pthread_ macro and changing thread.h to pthread.h Seems sketchy. Will have some more time with my compilers tonight. ;^) |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 11 02:44PM -0700 >> will work (at least on unix and linux systems). >> #define thrd_ pthread_ > Did you try that? I hope you realize that it doesn't actually work. Macro names are matched to entire tokens, and in thrd_create, thrd_ is only a part of the thrd_create token. Argh! For some reason I did not notice that. ;^o I will try it out anyway just for fun. |
Daniel <danielaparker@gmail.com>: Apr 11 03:11PM -0700 On Wednesday, April 11, 2018 at 4:38:28 PM UTC-4, Rick C. Hodgin wrote: > > Sure. > The only way that will change is if you are born again, and demonstrate > by half a handful of witnesses that you are truly born again. But if he says "come into my life and redeem my sins", and really, really means it ... https://www.oglaf.com/cure-light-wounds/ Daniel |
bartc <bc@freeuk.com>: Apr 11 11:15PM +0100 On 11/04/2018 21:06, red floyd wrote: > Agreed. Back when I first read K&R, what finally got me to understand > C pointers was that the declaration "int *x" meant "*x is an int". > I always put the asterisk next to the name. Yes, no matter how complex a type is specified for a variable, whatever arbitrary chain of pointers, arrays, and functions (but not structs**), when you evaluate an expression that corresponds to all those type elements, ie. dereferencing, index and calling, what you eventually get is a value of that base type, the bit that goes on the left. Which seems to me to put the emphasis on the wrong thing. Because there is a reason why x and y here: int x; int (*(*(*y)[5])[4])(double); have very different types, even though you will get an int in both cases, when you evaluate 'x' or '((*(*y)[i])[j])(3.4)'. It's because those variables are used in radically different, incompatible ways. And y doesn't always give an int result, only when you evaluate the whole thing. But in most of the program you might be working with y or (*y)[i] or any partial evaluation of the above, and the type might be anything but 'int'. When you pass x and y to a function, you're not passing two ints. In contrast, with a language with left-to-right type declarations, the emphasis is on what type x or y are, when written as x or y: int x # x has type int ref[5]ref [4]ref function(real)int y # y has type pointer to... You look at the left to find what type x and y start off as, at the right to find the type when fully evaluated, or in the middle for when partially evaluated: one deref and one index in, y is another pointer. ------------------- (** structs don't fit into the pattern: struct {int a,b;}* x; evaluating (*x).a gives you an int, not a struct.) -- bartc |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 11 03:17PM -0700 On Wednesday, April 11, 2018 at 6:12:01 PM UTC-4, Daniel wrote: > > The only way that will change is if you are born again, and demonstrate > > by half a handful of witnesses that you are truly born again. > But if he says "come into my life and redeem my sins", and really, really means it ... Have you ever read the New Testament? Saul of Tarsus was going around with legal documents able to detain Christians and take them back to Jerusalem to have them tried or killed. He was literally killing Christians. When he had his Road to Damascus experience and came to know the Lord, nobody wanted anything to do with him because of his repu- tation. For Ananias, who was sent to go and pray for him so he could receive his sight back after the Road to Damascus encounter, Ananias came back to the Lord with his Earthly fears, telling Him about all the people he had killed and the evil deeds he had done. It took the Lord's personal assurance before Ananias was okay to go, and did indeed go. For Chris, his witness is not of killing Christians, but it is in his total flippancy. It will take the heavier side of half a hand- ful of solid witnesses before I will even begin to consider that his salvation was real. Until then ... "Thank you, but no thank you." -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 11 03:27PM -0700 On Wednesday, April 11, 2018 at 5:10:15 PM UTC-4, Mr Flibble wrote: > That's the barrier of entry for the nuthouse? Any actor could fool you > and your crazy "witnesses" and get in it seems. I suggest you watch the > film "One Flew Over The Cuckoo's Nest". If it were reliant upon me and my personal faculties, yes I could be fooled. But the Lord knows who are His, and He personally protects them and keeps them from harm. Anything that does come through and is part of harm is part of His plan of allowance for some purpose. I would like to have you work on my project, Leigh. You have a host of skills that would augment the effort greatly. If you ever became a Christian I would seek you out to work on the project. You might just find my projects aren't the "toy projects" you think they are. -- Rick C. Hodgin |
Melzzzzz <Melzzzzz@zzzzz.com>: Apr 11 08:37PM > Okay... How many of your compilers can do this: > ______________________________________ > #include <threads.h> Ah, glibc does not supports C11 threads currently ;) -- press any key to continue or any other to quit... |
gazelle@shell.xmission.com (Kenny McCormack): Apr 11 10:52PM In article <40885b4d-2060-413a-9f66-24789d945305@googlegroups.com>, Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote: ... >your explanations about things. >With regards to all of my projects, there is a wall up between >me and you and nothing of your influence will get past that wall. I believe I speak for all of us when I say: THANK YOU!!!! Now, could you do the same with your religious claptrap? -- "Every time Mitt opens his mouth, a swing state gets its wings." (Should be on a bumper sticker) |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 11 04:06PM -0700 On Wednesday, April 11, 2018 at 6:52:47 PM UTC-4, Kenny McCormack wrote: > >me and you and nothing of your influence will get past that wall. > I believe I speak for all of us when I say: > THANK YOU!!!! You should add a dance to your jubilee: https://www.youtube.com/watch?v=2aMpDtDOrOA > Now, could you do the same with your religious claptrap? Were I posting as you indicate I would cease immediately. However, what I am posting is the way to forgiveness of sin and eternal life. It is notably different than religion. That's a point you've never understood. I hope someday you do. You are valuable, Kenny, and I would like to see you in Heaven. -- Rick C. Hodgin |
Bo Persson <bop@gmb.dk>: Apr 11 06:21PM +0200 On 2018-04-11 14:39, Juha Nieminen wrote: >> so it cannot meet that requirement. > One has to wonder why std::string couldn't accept a null char* as a valid > parameter, and interpret it has being an empty string. Originally it was considered an optimization. Assuming most std::strings are constructed from literals, a null-pointer test would be totally wasted on those. Bo Persson |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment