Re: Question w.r.t. `'class Foo' has virtual functions but non-virtual destructor` warning.

2005-03-05 Thread Michael N. Moran
ns without adding the virtual destructor to all of my many abstract base classes. IOW, it's bad juju in some programming styles/domains, but not in others. back to lurking... -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144ht

Re: Questions about trampolines

2005-03-14 Thread Michael N. Moran
Robert Dewar wrote: Michael N. Moran wrote: The AVR is a bit more extreme than the Harvard arch you're describing. The AVR has completely separate address spaces for instructions and data. Instruction data space cannot be accessed through a data space pointer. There are separate instruction

Re: Heads-up: volatile and C++

2005-04-14 Thread Michael N. Moran
roach. For example: o barrier keyword(s) o barrier qualifier(s) While I'm on my soap-box ... I would like to see some sort of alignment qualifiers added to the C++ language for those of us that need to deal with directly with page/cache alignment (for both types and objects.) -- Michae

Re: Heads-up: volatile and C++

2005-04-14 Thread Michael N. Moran
Paul Koning wrote: "Michael" == Michael N Moran <[EMAIL PROTECTED]> writes: Michael> Jason Merrill wrote: >> One proposed change is to the semantics of volatile. Michael> I'm not familiar with ia64 barrier instructions, but I *am* Michael> familiar with

Re: Heads-up: volatile and C++

2005-04-14 Thread Michael N. Moran
Jason Merrill wrote: On Thu, 14 Apr 2005 10:12:37 -0400, "Michael N. Moran" <[EMAIL PROTECTED]> wrote: Jason Merrill wrote: The C++ committee (well, a subgroup represented at this meeting by Hans Boehm) is working on a memory model that supports threaded programs. As someon

Re: Heads-up: volatile and C++

2005-04-14 Thread Michael N. Moran
lly address threading. -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." The Eagles, "Already Go

Re: Heads-up: volatile and C++

2005-04-15 Thread Michael N. Moran
ed to the MPC860 PowerPC . -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." The Eagles, "Alrea

Re: Heads-up: volatile and C++

2005-04-15 Thread Michael N. Moran
Jason Merrill wrote: On Thu, 14 Apr 2005 15:26:32 -0400, "Michael N. Moran" <[EMAIL PROTECTED]> wrote: For example, device drivers that perform memory mapped I/O on memory spaces which are "guarded" and thus need no additional ordering/synchronization instructions.

Re: Heads-up: volatile and C++

2005-04-15 Thread Michael N. Moran
ious things -- among which, maybe the most "paradoxical" is to avoid code bloat. Embedded C++ was a mistake, alas a mistake that seems to last. Just in case there is any voting going on here ... agreed :) -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5

Re: Heads-up: volatile and C++

2005-04-15 Thread Michael N. Moran
Paul Schlie wrote: Michael N. Moran wrote: I'm very much in favor of fine grained synchronization primitives in the compiler, but not of changes to volatile semantics. I wonder if it would be sufficient (if not preferable) to only extend (modify) the semantics for heap/stack and const vol

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
e having used it for more years than I care to remember ;-) -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Joe Buck wrote: On Mon, Nov 14, 2005 at 01:43:38PM -0500, Michael N. Moran wrote: Excuse me. IANALL nor am I a compiler expert but ... what kind of optimization might be done with the information that a reference *should* never be null? Especially within the server code (the implementation of

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Gabriel Dos Reis wrote: "Michael N. Moran" <[EMAIL PROTECTED]> writes: | And what is the meaning of code that does this: | | int foo(int& a) | { | int*b = &a; | | if(b ==0) | { | a(); | } | else | { | b(); |

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Joe Buck wrote: On Mon, Nov 14, 2005 at 01:43:38PM -0500, Michael N. Moran wrote: Excuse me. IANALL nor am I a compiler expert but ... what kind of optimization might be done with the information that a reference *should* never be null? Especially within the server code (the implementation of

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Gabriel Dos Reis wrote: "Michael N. Moran" <[EMAIL PROTECTED]> writes: [...] | Do we want to hide the error by not crashing? Why not just do the | math and keep running? This seems like a run-time check that | is not a part of the C/C++ language as I understand it. defined by

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Gabriel Dos Reis wrote: "Michael N. Moran" <[EMAIL PROTECTED]> writes: | void buzz(Abc& b) | { | delete &b; | } | | void baz() | { | Abc& a = * new Abc(); If no memory is available, the new-expression throws an exception so the dereference never occurs.

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Gabriel Dos Reis wrote: "Michael N. Moran" <[EMAIL PROTECTED]> writes: | Wow. I'm sure there is sound reasoning for this ... but I can't | understand what that might be given a client module could intentionally | (if ill-adviseadly) simply invoke the function: the

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Gabriel Dos Reis wrote: "Michael N. Moran" <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis wrote: | > "Michael N. Moran" <[EMAIL PROTECTED]> writes: | > | void buzz(Abc& b) | > | { | > | delete &b; | > | } | > | | void baz() |

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Gabriel Dos Reis wrote: "Michael N. Moran" <[EMAIL PROTECTED]> writes: | From info gcc: | | `-fdelete-null-pointer-checks' | Use global dataflow analysis to identify and eliminate useless | checks for null pointers. The compiler assumes that dereferencing |

Re: Null pointer check elimination

2005-11-14 Thread Michael N. Moran
Gabriel Dos Reis wrote: "Michael N. Moran" <[EMAIL PROTECTED]> writes: | void bar(int& a); | | void foo(int* a) | { | // dereference: conversion to reference | // Since there is not necessarily any object access, | // thus no assured SEGFAULT. | bar(*a)

Re: Is there any reason to use vfork() ?

2014-05-13 Thread Michael N. Moran
h a large RAM footprint that needs to spawn a child process with an otherwise much smaller RAM footprint. -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144http://mnmoran.org The Beatles were wrong: 1 & 1 & 1 is 1

Re: obvious race condition in darwin/netbsd __enable_execute_stack due to caching pagesize/mask

2008-08-27 Thread Michael N. Moran
Andrew Thomas Pinski wrote: On Aug 27, 2008, at 0:27, Jay <[EMAIL PROTECTED]> wrote: size = getpagesize(); \ mask = ~((long) size - 1); Or even better store size after the store to mask. That is: int tmp = getpagesize(); *(volatile*)&mask = ~((long)tm