This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: type based aliasing again


  In message <Pine.LNX.4.10.9909091451290.28913-100000@tcadi02.sc.intel.com>you
 write:
  > 
  > 
  > Hi,
  > 
  > I wouldn't try to explain the concept of 'aliasing' and its relevance
  > to the user. The right place for that might be a special chapter in
  > the info pages but not inlined in the main commandline option
  > information or in a warning.
  > 
  > Personally I've always liked the linux kernel config saying
  > 'if you don't know what this is all about, choose No'.
  > Most users probably don't care and don't want to know.
  > 
  > A warning in case the user has already chosen an aliasing option
  > (knowing the ISO rules or knowing (s)he knows nothing about them)
  > would be an annoyance. A warning in the no-option case, however,
  > is extremely desirable.
I think this approach is fundamentally flawed.  In fact, it is this kind of
approach that has led to so many problems between GCC and the Linux kernel's
use of certain GCC extensions.

  > 4 assume-unaliased
  > ==================
  > 
  >    Assume access to memory is never aliased even though it might
  >    be considered so under the ISO rules. (New flag).
  > 
  >    Tell the user that 'this option will most likely break all your
  >    code; use this option only if you know what you are doing'.
  > 
IMHO This is very very bad.  The problem is while you the programmer may not
have created any aliases, the compiler might during the translation down to RTL
and subsequent optimization phases.



jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]