- conversion from 'int' to non-scalar type 'std::__cxx11::string - 5 Updates
- Are bitfields useful? - 12 Updates
- [Jesus Loves You] Some OT reading ... if interested - 8 Updates
RM <robert_magdziarz@wp.pl>: Jul 31 12:33PM +0200 Napisałem coś takiego: char *tmp_tmplt = const_cast<char *>("/tmp/dirtyphp_XXXXXX"); string tmp_filename = mkstemp(tmp_tmplt); I mam błąd kompilacji: src/obfuscator.cpp: In member function 'std::__cxx11::string obfuscator::check_not_allowed_syntax(std::__cxx11::string, std::__cxx11::string, std::__cxx11::string)': src/obfuscator.cpp:147:34: error: conversion from 'int' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' requested string tmp_filename = mkstemp(tmp_tmplt); ~~~~~~~^~~~~~~~~~~ Nie rozumiem tego błędu ponieważ tmp_tmplt jest typu char* a nie int. |
RM <robert_magdziarz@wp.pl>: Jul 31 12:41PM +0200 Sorry I have mistaken newsgroup. Now in English: I wrote: char *tmp_tmplt = const_cast<char *>("/tmp/dirtyphp_XXXXXX"); string tmp_filename = mkstemp(tmp_tmplt); And I have compilation error: src/obfuscator.cpp: In member function 'std::__cxx11::string obfuscator::check_not_allowed_syntax(std::__cxx11::string, std::__cxx11::string, std::__cxx11::string)': src/obfuscator.cpp:147:34: error: conversion from 'int' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' requested string tmp_filename = mkstemp(tmp_tmplt); ~~~~~~~^~~~~~~~~~~ I don't understand the error because tmp_tmplt is of type char*, not int. |
Bo Persson <bo@bo-persson.se>: Jul 31 12:54PM +0200 On 2020-07-31 at 12:41, RM wrote: > string tmp_filename = mkstemp(tmp_tmplt); > ~~~~~~~^~~~~~~~~~~ > I don't understand the error because tmp_tmplt is of type char*, not int. Yes, but what does msktemp return? int mkstemp(char *template); The compiler complains about trying to construct the std::string from the int return value. Another problem is that casting away const from the literal isn't going to make it writable. I would expect a runtime error here when testing the code. Bo Persson |
RM <robert_magdziarz@wp.pl>: Jul 31 01:44PM +0200 Thank you. I corrected my code. char tmp_filename[21] = "/tmp/dirtyphp_XXXXXX"; close(mkstemp(tmp_filename)); |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Jul 31 11:01AM -0700 > I corrected my code. > char tmp_filename[21] = "/tmp/dirtyphp_XXXXXX"; > close(mkstemp(tmp_filename)); Better: char tmp_filename[] = "/tmp/dirtyphp_XXXXXX"; Let the compiler figure out how big it needs to be. (Computers are really good at counting things.) -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
Bo Persson <bo@bo-persson.se>: Jul 31 10:40AM +0200 On 2020-07-30 at 18:37, Juha Nieminen wrote: > guaranteed to be laid out as you want, and their layout > (and even how many bytes they take) may change from compiler > to compiler and system to system. Correct. In addition to all this, and in addition to being little endian or big endian, it is also known that for example VC++ and gcc don't agree on which order to allocate bits. So if Frederick has u8 transparent : 1; u8 reserved0 : 7; The transparent bit will be the high bit with some compilers and the low bit on others. Bo Persson |
Scott Newman <scott69@gmail.com>: Jul 31 12:38PM +0200 > u8 reserved0 : 7; > The transparent bit will be the high bit with some compilers and the low > bit on others. The decision is whether the compiler compiles for a big-endian machine or a little-endian machine. A big-endian compiler begins to fill up the bits from the high-bit, a little-endian compiler does it the oppostite way. |
Bo Persson <bo@bo-persson.se>: Jul 31 12:46PM +0200 On 2020-07-31 at 12:38, Scott Newman wrote: > or a little-endian machine. A big-endian compiler begins to fill up the > bits from the high-bit, a little-endian compiler does it the oppostite > way. No, that's exactly not the case. Even when you compile for x86, VC++ and g++ will start from opposite ends. The standard allows either way, and that's what happens. Bo Persson |
Scott Newman <scott69@gmail.com>: Jul 31 12:48PM +0200 > No, that's exactly not the case. That's what actually happens with the current compilers. |
Bo Persson <bo@bo-persson.se>: Jul 31 01:00PM +0200 On 2020-07-31 at 12:48, Scott Newman wrote: >> No, that's exactly not the case. > That's what actually happens with the current compilers. You did notice the example on the very next line, didn't you: "Even when you compile for x86, VC++ and g++ will start from opposite ends. The standard allows either way, and that's what happens." Not everyone believes that gcc on Linux is the entire world when writing portable code. Bo Persson |
Scott Newman <scott69@gmail.com>: Jul 31 01:07PM +0200 > "Even when you compile for x86, VC++ and g++ will start from opposite > ends. The standard allows either way, and that's what happens." What the standard says doesn't count. What counts is what current compilers do. You can rely on that a little-endian or big-endian compiler does it like I said since no one would use a compiler that would it different because this would break the conventions. |
James Kuyper <jameskuyper@alumni.caltech.edu>: Jul 31 05:09AM -0700 On Friday, July 31, 2020 at 7:07:42 AM UTC-4, Scott Newman wrote: > You can rely on that a little-endian or big-endian compiler does it > like I said since no one would use a compiler that would it different > because this would break the conventions. So, on an x86, since VC++ and g++ do in fact do it differently, one of those two very popular compilers must be one that "no one would use" - which one? I ask because I don't know which one of those does it in a different order than the one you expect - I've used both compilers (which, according to you, makes me "no one"), but it would never occur to me to write code that would require me to know which order they use. |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jul 31 12:11PM On Fri, 2020-07-31, Bo Persson wrote: >> bits from the high-bit, a little-endian compiler does it the oppostite >> way. > No, that's exactly not the case. As far as I can tell, "Scott Newman" gives plausible but incorrect information on purpose. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
Scott Newman <scott69@gmail.com>: Jul 31 02:13PM +0200 > So, on an x86, since VC++ and g++ do in fact do it differently, one of > those two very popular compilers must be one that "no one would use" - > which one? VC++ behaves like what I said since there are only little-endian targets for VC++. |
Bo Persson <bo@bo-persson.se>: Jul 31 02:57PM +0200 On 2020-07-31 at 14:11, Jorgen Grahn wrote: >> No, that's exactly not the case. > As far as I can tell, "Scott Newman" gives plausible but incorrect > information on purpose. The nicest interpretation is that he only uses gcc on Linux, and considers everything else irrelevant. Of course makes it easy for him to write "portable" code. :-) Bo Persson |
Scott Newman <scott69@gmail.com>: Jul 31 03:00PM +0200 > The nicest interpretation is that he only uses gcc on Linux, and > considers everything else irrelevant. Of course makes it easy for > him to write "portable" code. :-) I'm neither talking about gcc, nor MSVC or whatever. Regarding the placement of bitfields you can simply distinguish between compilers for big-endian and little-endian targets. |
James Kuyper <jameskuyper@alumni.caltech.edu>: Jul 31 08:15AM -0700 On Friday, July 31, 2020 at 8:14:06 AM UTC-4, Scott Newman wrote: > > which one? > VC++ behaves like what I said since there are only little-endian targets > for VC++. I've only ever used VC++ because my employer choose it for the application they were paying me to work on. I had no need or interest in knowing whether it supports big-endian targets. Therefore, I'll take your word for that - (or maybe I won't - your reputation for accuracy isn't exactly the highest). However, according to Bo (I have not bothered personally investigating this) on precisely those same targets, g++ allocates bit-fields the other way around. According to you, that means that "no one would use" g++? How do you reconcile that claim with the fact that g++ is one of the most popular compilers targeting those platforms? |
rick.c.hodgin@gmail.com: Jul 30 09:00PM -0700 This thought occurred to me: https://groups.google.com/d/msg/alt.astronomy/vL_HAEDMbT8/q930nO4TAAAJ -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 31 01:16PM +0100 > This thought occurred to me: > https://groups.google.com/d/msg/alt.astronomy/vL_HAEDMbT8/q930nO4TAAAJ Fuck off, spammer. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
rick.c.hodgin@gmail.com: Jul 31 05:27AM -0700 On Friday, July 31, 2020 at 8:16:42 AM UTC-4, Mr Flibble wrote: > > https://groups.google.com/d/msg/alt.astronomy/vL_HAEDMbT8/q930nO4TAAAJ > [Expletive deleted], spammer. > /Flibble You are Leigh Johnston. Not Flibble. Leigh Johnston, I bet you won't read the article. Too much truth for you to handle. You always say, "And Satan invented fossils, yes?" like a parroting child. Well here's a potential answer to your skepticism. But I bet you won't read it because you don't seek the truth. Do you? Cluck cluck cluck cluck. -- Rick C. Hodgin |
Juha Nieminen <nospam@thanks.invalid>: Jul 31 12:43PM > Leigh Johnston, I bet you won't read the article. Too much truth > for you to handle. It's complete fiction which is complete insanity if anybody were to believe it. |
rick.c.hodgin@gmail.com: Jul 31 06:32AM -0700 On Friday, July 31, 2020 at 8:44:08 AM UTC-4, Juha Nieminen wrote: > It's complete fiction which is complete insanity if anybody were to believe it. That is definitely one possibility. The scenario answers many questions. It asserts God's design. It asserts our need for a Savior. It aligns with faith, and with what we see, just without the enemy's false narrative, for that enemy has purposes on Earth which are of deception and harm: to steal, kill, destroy. You can trust in God. You cannot trust in that enemy. He lies. God does not lie. Consider these things, Juha. Seek the truth and test the things you know against the narrative. See how many things we've observed with questions today are answered in this scenario. -- Rick C. Hodgin |
rick.c.hodgin@gmail.com: Jul 31 06:44AM -0700 > On Friday, July 31, 2020 at 8:44:08 AM UTC-4, Juha Nieminen wrote: > > It's complete fiction which is complete insanity if anybody were to believe it. > That is definitely one possibility. The scenario answers many questions. It asserts God's design. It asserts our need for a Savior. It aligns with faith, and with what we see... Remember, the Bible describes that in the beginning God created everything in seven literal days. But even the things He created were not designed for a one-off use. Everything was designed to be part of a system which moves forward from that point forward. Apple trees were created and they were designed to have seeds within themselves to produce the next generation of trees, and to provide food for the people that would be born. It's not a stretch to recognize that God initially created everything as the Bible describes, and then there is this cycle which goes on after. It even states in Revelation that John saw a new Heaven and a new Earth, for the first Earth had past away, which is a hint of this scenario. Revelation 21 https://www.biblegateway.com/passage/?search=Revelation%2021&version=NIV;KJV 1 Then I saw "a new heaven and a new earth,"for the first heaven and the first earth had passed away, and there was no longer any sea. 2 I saw the Holy City, the new Jerusalem, coming down out of heaven from God, prepared as a bride beautifully dressed for her husband. 3 And I heard a loud voice from the throne saying, "Look! God's dwelling place is now among the people, and he will dwell with them. They will be his people, and God himself will be with them and be their God. 4 'He will wipe every tear from their eyes. There will be no more death' or mourning or crying or pain, for the old order of things has passed away." 5 He who was seated on the throne said, "I am making everything new!" Then he said, "Write this down, for these words are trustworthy and true." 6 He said to me: "It is done. I am the Alpha and the Omega, the Beginning and the End. To the thirsty I will give water without cost from the spring of the water of life. 7 Those who are victorious will inherit all this, and I will be their God and they will be my children. 8 But the cowardly, the unbelieving, the vile, the murderers, the sexually immoral, those who practice magic arts, the idolaters and all liars—they will be consigned to the fiery lake of burning sulfur. This is the second death." The NIV translates it as "sulfur" but the original Greek language uses more words to describe it, which are translated as fire and brimstone: https://biblehub.com/text/revelation/21-8.htm Peter talked about the elements being melted with fervent heat: https://www.biblegateway.com/passage/?search=2+Peter+3%3A10&version=NIV;kjv 10 But the day of the Lord will come as a thief in the night; in the which the heavens shall pass away with a great noise, and the elements shall melt with fervent heat, the earth also and the works that are therein shall be burned up. I contacted someone who is a Christian and a PhD astrophysicist to get their input on this idea, and they would not respond to me after the initial outreach. I don't know why. Even if they concluded it was as errant as you suggest, Juha, I would've expected a "Go away. You're insane" type response. But nothing. So, I post it for people to consider. -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 31 03:52PM +0100 > That is definitely one possibility. The scenario answers many questions. It asserts God's design. It asserts our need for a Savior. It aligns with faith, and with what we see, just without the enemy's false narrative, for that enemy has purposes on Earth which are of deception and harm: to steal, kill, destroy. > You can trust in God. You cannot trust in that enemy. He lies. God does not lie. > Consider these things, Juha. Seek the truth and test the things you know against the narrative. See how many things we've observed with questions today are answered in this scenario. Fuck off, spammer. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 31 03:53PM +0100 > child. Well here's a potential answer to your skepticism. But I bet > you won't read it because you don't seek the truth. Do you? > Cluck cluck cluck cluck. Fuck off, spammer. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
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