public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "matz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/45265] GCC has an intermittent bug when computing the address of function parameters Date: Fri, 13 Aug 2010 13:14:00 -0000 [thread overview] Message-ID: <20100813131407.16934.qmail@sourceware.org> (raw) In-Reply-To: <bug-45265-19547@http.gcc.gnu.org/bugzilla/> ------- Comment #36 from matz at gcc dot gnu dot org 2010-08-13 13:14 ------- > > If you include real segmentation > > like on 80286, where there's no linear relationship between effective > > address and segment+offset, subtraction would have been prohibitively > > expensive to implement anyway. > What you don't know is that when you subtracted far pointers the compiler > generated the code to change seg16:ofs16 into abs20. What in the words "real segmentation like on 286, where there's no linear relationship between effective address and segment+offset" was unclear to you to expect that abs20==seg16*16+ofs16? The "prohibitive expensive" referred to the necessary lookup of the base in the LDT/GDT that would have been required for every far pointer subtraction. > > And you still wouldn't get around the size limitation of ptrdiff_t that > > was 16bit. > What the hell are you talking about????? I personally disassembled code in > the late 80's to see how the compiler implemented 32-bit arithmetic on a > 286. It did, and it did it well. You weren't able to go beyond 16 bits in > the 80's? Did I say that? Let's see: "size limitation of ptrdiff_t that was 16bit". Nope. I didn't. The point being that if ptrdiff_t is only 16 bit, then no matter how fantastically capable the compiler was in emitting 32bit arithmetic, the result of subtracting to char pointers pointing more than 64KB (or in fact 32KB) apart would not fit into a ptrdiff_t. > No, not me, I don't want to write nonsense on the web, Maybe you don't necessarily want to. But ... , well, there we are. > I prefer to be clear headed. One never knows when stuff one wrote on the > net will come back and bite one in the ass!! I'm not sure you realize just how true that is. But keep going, you're by far one of the best trolls I've seen in GCC land. Much better than Pizarro. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45265
next prev parent reply other threads:[~2010-08-13 13:14 UTC|newest] Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-08-12 14:50 [Bug c++/45265] New: " rogerio at rilhas dot com 2010-08-12 14:52 ` [Bug c++/45265] " rogerio at rilhas dot com 2010-08-12 14:52 ` rogerio at rilhas dot com 2010-08-12 14:54 ` rogerio at rilhas dot com 2010-08-12 15:09 ` jakub at gcc dot gnu dot org 2010-08-12 15:25 ` schwab at linux-m68k dot org 2010-08-12 15:33 ` rogerio at rilhas dot com 2010-08-12 15:34 ` rogerio at rilhas dot com 2010-08-12 15:52 ` schwab at linux-m68k dot org 2010-08-12 15:52 ` redi at gcc dot gnu dot org 2010-08-12 16:00 ` matz at gcc dot gnu dot org 2010-08-12 16:05 ` rogerio at rilhas dot com 2010-08-12 16:09 ` redi at gcc dot gnu dot org 2010-08-12 16:10 ` pinskia at gcc dot gnu dot org 2010-08-12 16:11 ` jakub at gcc dot gnu dot org 2010-08-12 16:15 ` rogerio at rilhas dot com 2010-08-12 16:17 ` redi at gcc dot gnu dot org 2010-08-12 16:18 ` rogerio at rilhas dot com 2010-08-12 16:19 ` rogerio at rilhas dot com 2010-08-12 16:20 ` redi at gcc dot gnu dot org 2010-08-12 16:58 ` dj at redhat dot com 2010-08-12 17:09 ` froydnj at gcc dot gnu dot org 2010-08-12 17:25 ` rogerio at rilhas dot com 2010-08-12 17:25 ` rogerio at rilhas dot com 2010-08-12 17:50 ` rogerio at rilhas dot com 2010-08-12 17:54 ` redi at gcc dot gnu dot org 2010-08-12 18:04 ` rogerio at rilhas dot com 2010-08-12 18:05 ` matz at gcc dot gnu dot org 2010-08-12 18:08 ` dj at redhat dot com 2010-08-12 18:24 ` rogerio at rilhas dot com 2010-08-12 18:28 ` pinskia at gcc dot gnu dot org 2010-08-12 18:32 ` rogerio at rilhas dot com 2010-08-12 18:39 ` rogerio at rilhas dot com 2010-08-12 18:56 ` matz at gcc dot gnu dot org 2010-08-13 12:14 ` rogerio at rilhas dot com 2010-08-13 13:00 ` matz at gcc dot gnu dot org 2010-08-13 13:14 ` matz at gcc dot gnu dot org [this message] 2010-08-13 13:32 ` paolo dot carlini at oracle dot com 2010-08-13 14:47 ` rogerio at rilhas dot com 2010-08-13 14:48 ` rogerio at rilhas dot com 2010-08-13 14:53 ` rogerio at rilhas dot com 2010-08-13 15:18 ` matz at gcc dot gnu dot org 2010-08-13 15:26 ` matz at gcc dot gnu dot org 2010-08-13 16:28 ` rogerio at rilhas dot com 2010-08-13 16:30 ` rogerio at rilhas dot com 2010-08-13 16:33 ` redi at gcc dot gnu dot org 2010-08-13 16:42 ` rogerio at rilhas dot com 2010-08-13 18:00 ` ubizjak at gmail dot com 2010-08-13 21:16 ` rogerio at rilhas dot com 2010-08-13 22:38 ` redi at gcc dot gnu dot org 2010-08-13 22:40 ` redi at gcc dot gnu dot org 2010-08-14 1:26 ` matz at gcc dot gnu dot org 2010-08-14 13:18 ` rogerio at rilhas dot com 2010-08-14 13:55 ` redi at gcc dot gnu dot org 2010-08-14 14:25 ` redi at gcc dot gnu dot org 2010-08-14 14:32 ` rogerio at rilhas dot com 2010-08-14 14:34 ` rogerio at rilhas dot com 2010-08-14 15:09 ` redi at gcc dot gnu dot org 2010-08-14 16:02 ` rogerio at rilhas dot com 2010-08-14 17:11 ` redi at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100813131407.16934.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).