Bug#181096: gcc-3.2: gcc fails to optimise if (l&2) l|=2 away

2003-02-15 Thread herbert
Package: gcc-3.2
Version: 1:3.2.3-0pre1
Severity: wishlist

The following function doesn't get optimised away as a noop:

int k(int l)
{
if (l & 2)
l |= 2;
return l;
}

$ gcc-3.2 -O2 -S b.c
$ cat b.s
.file   "b.c"
.text
.p2align 2,,3
.globl k
.type   k,@function
k:
pushl   %ebp
movl%esp, %ebp
movl8(%ebp), %eax
testl   $2, %eax
je  .L2
orl $2, %eax
.L2:
leave
ret
.Lfe1:
.size   k,.Lfe1-k
.ident  "GCC: (GNU) 3.2.3 20030210 (Debian prerelease)"

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux gondolin 2.4.20-686-smp #1 SMP Mon Jan 13 23:06:41 EST 
2003 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

Versions of the packages gcc-3.2 depends on:
ii  binutils   2.13.90.0.10-1 The GNU assembler, linker and binary utiliti
ii  cpp-3.23.2.1-0pre3The GNU C preprocessor.
ii  gcc-3.2-base   3.2.1-0pre3The GNU Compiler Collection (base package).
ii  libc6  2.2.5-14.3 GNU C Library: Shared libraries and Timezone
ii  libgcc13.2.1-0pre3GCC support library.




Bug#180937: g++ internal compiler error: Error reporting routines re-entered

2003-02-15 Thread H. S. Teoh
On Fri, Feb 14, 2003 at 12:50:43PM -0500, Daniel Jacobowitz wrote:
> On Fri, Feb 14, 2003 at 12:14:01AM -0500, H. S. Teoh wrote:
[snip]
> > Also, why doesn't g++ like the declaration of objects inside a switch
> > statement? Is this invalid according to the C++ spec, or is it a GCC
> > oddity? Regardless, the internal compiler error is certainly a bug. 
> 
> I'm pretty sure it's illegal.  Consider this - what is the scope of
> obj1 in the below?  It starts at the first label, and goes until the
> end of the case block.  So it's in scope at CHOICE_B.  But its
> constructor wasn't called
[snip]

Ah, I see. I guess I'm so used to writing cases with break's that I forgot
that C/C++ semantics allow cases to fall through to the next case. I had
intended the semantics to be:

switch (choice) {
  case A: {
someobj x;
...
  }
  break;
  case B: {
...
  }
  break;
  ...
}

Obviously, this isn't the case with what I actually wrote.


T

-- 
GEEK = Gatherer of Extremely Enlightening Knowledge




Edited and updated by a Human team

2003-02-15 Thread Fine Art
Title: art-online TM - The Fine Art Directory by Artprice

 

 T  H  EF  I  N  EA  R  TD  I  R  E  C  T  O  R  Y


 
 


   Art History
Art market
Art Venues
Artists
Awards
Education
Employment
Events
Galleries
Goverments
Legal
Museums
Professionals
Resources
Shopping


http://www.Art-Online.com
Edited and updated by a Human team

 by 

 Art-online ©1995  1987  
 ©Thierry Ehrmann
  
To unsubscribe:

http://list.artmarket.com/[EMAIL PROTECTED]&L=1

In case the above link does not work, please reply to this message as it is.This email has been sent to: debian-gcc@lists.debian.org - Please allow us 72 H for your e-mail to be removed.Thank you for your co-operation.
Pour se désinscrire :

http://list.artmarket.com/[EMAIL PROTECTED]&L=1

Si le lien ci-dessus ne fonctionne pas,  répondez s'il-vous-plaît à ce message sans en modifier le contenu.Cet email a été envoyé à : debian-gcc@lists.debian.org - Votre désinscription sera effective dans les 72 H. Merci de votre coopération.
En conformité avec la loi 78-17 du 6/1/78 (CNIL), vous pouvez demander à ne plus figurer sur notre fichier de routage.