Re: experimental gcc-3.2 packages

2002-08-09 Thread Chris Halls
On Thu, Aug 08, 2002 at 09:58:57PM +0200, Martin v. Loewis wrote:
> Chris Halls <[EMAIL PROTECTED]> writes:
> 
> > I have posted the test script and preprocessed source here:
> >   http://apt-proxy.sourceforge.net/ooo/g++test
> >   http://apt-proxy.sourceforge.net/ooo/test.cxx.bz2
> 
> Maybe I'm missing something, but... Is it the case that
> ucb::ContentProviderImplHelper::~ContentProviderImplHelper is not
> implemented in this file? Is it further the case that this is the
> first virtual function of ContentProviderImplHelper?

Hmm, yes it looks like that is the case.

> If so, the virtual table for that class should not be emitted in
> test.o, and it appears that g++ 3.1 behaves correctly in this respect.

I take it that the 'typeinfo' should also not be emitted, as well as the
virtual table?

g++ 3.1 is actually emitting this typeinfo, along with 3.0 and 2.95 - it is
the preliminary g++ 3.2 that is no longer emitting this information.  This
is going to break OpenOffice and any other programs that rely on this
behaviour.

So, should this change be considered to be a bug fix in g++ 3.2, and
anything which breaks because of it should be fixed, or is it a problem with
g++ 3.2?  I'm pretty agnostic either way - I'm just trying to determine
which program gets the blame and which needs fixing :)

Thanks,
Chris


pgpwWv1JBzRZQ.pgp
Description: PGP signature


[no subject]

2002-08-09 Thread Johannes Stezenbach

>Submitter-Id:  net
>Originator:Johannes Stezenbach
>Organization:  
>Confidential:  no
>Synopsis:  gcc-3.1.1 (debian/i386): wrong code with -O2 / bitfields / 
>pointer aliasing
>Severity:  serious
>Priority:  medium
>Category:  optimization
>Class: wrong-code
>Release:   3.1.1 (Debian testing/unstable)
>Environment:
System: Linux hell 2.4.19pre1 #3 Sun May 12 19:15:17 CEST 2002 i686 unknown 
unknown GNU/Linux
Architecture: i686


host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds3/src/configure -v 
--enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/3.1 --enable-shared --with-system-zlib 
--enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu 
--enable-__cxa_atexit --enable-threads=posix --enable-java-gc=boehm 
--enable-objc-gc i386-linux
>Description:
The attached sample program produces wrong output when
compiled with -O2. Output produced when compiled with-O is
correct.
I'm attaching the C source as well as compressed preprcessor output.
 
$ gcc-3.1 -Wall -O2 bug.c -o bug
$ ./bug
8 8
0xbeaddeef 0x34127856
0xa307401c 0x12345678
 
$ gcc-3.1 -Wall -O bug.c -o bug
$ ./bug
8 8
0xbeaddeef 0x34127856
0xdeadbeef 0x12345678

$ gcc-3.1 -v -Wall -O2 bug.c -o bug
Reading specs from /usr/lib/gcc-lib/i386-linux/3.1.1/specs
Configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds3/src/configure -v 
--enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/3.1 --enable-shared --with-system-zlib 
--enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu 
--enable-__cxa_atexit --enable-threads=posix --enable-java-gc=boehm 
--enable-objc-gc i386-linux
Thread model: posix
gcc version 3.1.1
 /usr/lib/gcc-lib/i386-linux/3.1.1/cc1 -lang-c -v -D__GNUC__=3 
-D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -D__gnu_linux__ 
-Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux 
-Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 
-Di386 -D__i386 -D__i386__ -D__tune_i386__ bug.c -quiet -dumpbase bug.c -O2 
-Wall -version -o /home/js/tmp/ccA9puym.s
GNU CPP version 3.1.1 (cpplib) (i386 Linux/ELF)
GNU C version 3.1.1 (i386-linux)
compiled by GNU C version 3.1.1.
ignoring nonexistent directory "/usr/i386-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-linux/3.1.1/include
 /usr/include
End of search list.
 as -V -Qy -o /home/js/tmp/ccA3HBCF.o /home/js/tmp/ccA9puym.s
GNU assembler version 2.12.90.0.15 (i386-linux) using BFD version 2.12.90.0.15 
20020717 Debian GNU/Linux
 /usr/lib/gcc-lib/i386-linux/3.1.1/collect2 --eh-frame-hdr -m elf_i386 
-dynamic-linker /lib/ld-linux.so.2 -o bug 
/usr/lib/gcc-lib/i386-linux/3.1.1/../../../crt1.o 
/usr/lib/gcc-lib/i386-linux/3.1.1/../../../crti.o 
/usr/lib/gcc-lib/i386-linux/3.1.1/crtbegin.o 
-L/usr/lib/gcc-lib/i386-linux/3.1.1 
-L/usr/lib/gcc-lib/i386-linux/3.1.1/../../.. /home/js/tmp/ccA3HBCF.o -lgcc 
-lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i386-linux/3.1.1/crtend.o 
/usr/lib/gcc-lib/i386-linux/3.1.1/../../../crtn.o



>How-To-Repeat:
/* gcc-3.1.1 bug: wrong results with -O2 */

#include 
#include 

struct foo {
unsigned int a: 8,
 b:24;
unsigned int c:16,
 d:16;
};
struct foo_swabbed {
unsigned int b:24,
 a: 8;
unsigned int d:16,
 c:16;
};

static void swab_foo(struct foo *f)
{
struct foo_swabbed fs = *(struct foo_swabbed *) f;
unsigned int *p = (unsigned int *)&fs;

p[0] = __swab32(p[0]);
p[1] = __swab32(p[1]);
f->a = fs.a;
f->b = fs.b;
f->c = fs.c;
f->d = fs.d;
}

int main(void)
{
struct foo f = { 0xef, 0xbeadde,  0x7856, 0x3412 };
unsigned int *p = (unsigned int *)&f;
printf("%u %u\n", sizeof(struct foo), sizeof(struct foo_swabbed));
printf("%#010x %#010x\n", p[0], p[1]);
swab_foo(&f);
printf("%#010x %#010x\n", p[0], p[1]);
return 0;
}

>Fix:





preprocessor option -MM has change semantic

2002-08-09 Thread boehme

>Submitter-Id:  net
>Originator:
>Organization:  
>Confidential:  no
>Synopsis:  preprocessor option -MM has change semantic
>Severity:  serious
>Priority:  medium
>Category:  preprocessor
>Class: change-request
>Release:   3.1.1 (Debian testing/unstable)
>Environment:
System: Linux kosh 2.4.18-k7 #1 Sun Apr 14 13:19:11 EST 2002 i686 unknown 
unknown GNU/Linux
Architecture: i686


host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds3/src/configure -v 
--enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/-3.1 --enable-shared --with-system-zlib 
--enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu 
--enable-__cxa_atexit --enable-threads=posix --enable-java-gc=boehm 
--enable-objc-gc i386-linux
>Description:
In gcc 3.1, -MM prints dependencies even to files included with
angle brackets (), if those are found through -I options.
This behaviour is unintuitive and a change from earlier versions.

It appears that the only way to suppress these files is to use the
-isystem directive, which is quite gcc specific and hard to use
in a makefile that needs to work across different compilers, or
that is generated by autoconf.
>How-To-Repeat:
Compile the file

#include 

int
main()
{
}

with gcc -I. -MM; this gives

a.o: a.c a.h

even though a.h should not have been mentioned.

>Fix:
No real work-around is known.




Re: experimental gcc-3.2 packages

2002-08-09 Thread Martin v. Loewis
Chris Halls <[EMAIL PROTECTED]> writes:

> > If so, the virtual table for that class should not be emitted in
> > test.o, and it appears that g++ 3.1 behaves correctly in this respect.
> 
> I take it that the 'typeinfo' should also not be emitted, as well as the
> virtual table?

Correct.

> g++ 3.1 is actually emitting this typeinfo, along with 3.0 and 2.95 - it is
> the preliminary g++ 3.2 that is no longer emitting this information.  This
> is going to break OpenOffice and any other programs that rely on this
> behaviour.

Those programs are broken already. In C++, you must implement all
virtual functions.

> So, should this change be considered to be a bug fix in g++ 3.2, and
> anything which breaks because of it should be fixed, or is it a
> problem with g++ 3.2?

It's clearly a bug fix.

Regards,
Martin




gcc-3.2_3.2ds0-0pre3_i386.changes is NEW

2002-08-09 Thread Debian Installer
(new) cpp-3.2-doc_3.2-0pre3_all.deb optional doc
Documentation for the GNU C preprocessor (cpp).
 Documentation for the GNU C preprocessor in info format.
(new) cpp-3.2_3.2-0pre3_i386.deb standard interpreters
The GNU C preprocessor.
 The GNU C preprocessor is a macro processor that is used automatically
 by the GNU C compiler to transform programs before actual compilation.
 .
 This package has been separated from gcc for the benefit of those who
 require the preprocessor but not the compiler.
fastjar_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/fastjar_3.2-0pre3_i386.deb
fixincludes_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/fixincludes_3.2-0pre3_i386.deb
(new) g++-3.2_3.2-0pre3_i386.deb optional devel
The GNU C++ compiler.
 This is the GNU C++ compiler, a fairly portable optimizing compiler for C++.
(new) g77-3.2-doc_3.2-0pre3_all.deb optional doc
Documentation for the GNU Fortran compiler (g77).
 Documentation for the GNU Fortran 77 compiler in info format.
(new) g77-3.2_3.2-0pre3_i386.deb optional devel
The GNU Fortran 77 compiler.
 This is the GNU g77 Fortran compiler, which compiles
 Fortran 77 on platforms supported by the gcc compiler. It uses the
 gcc backend to generate optimized code.
(new) gcc-3.2-base_3.2-0pre3_i386.deb standard devel
The GNU Compiler Collection (base package).
 This package contains files common to all languages and libraries
 contained in the GNU Compiler Collection (GCC).
(new) gcc-3.2-doc_3.2-0pre3_all.deb optional doc
Documentation for the GNU compilers (gcc, gobjc, g++).
 Documentation for the GNU compilers in info format.
(new) gcc-3.2_3.2-0pre3_i386.deb standard devel
The GNU C compiler.
 This is the GNU C compiler, a fairly portable optimizing compiler for C.
(new) gcc-3.2_3.2ds0-0pre3.diff.gz standard devel
(new) gcc-3.2_3.2ds0-0pre3.dsc standard devel
(new) gcc-3.2_3.2ds0.orig.tar.gz standard devel
(new) gcj-3.2_3.2-0pre3_i386.deb optional devel
The GNU compiler for Java(TM).
 GCJ is a front end to the GCC compiler which can natively compile both
 Java(tm) source and bytecode files. The compiler can also generate class
 files.
(new) gij-3.2_3.2-0pre3_i386.deb optional devel
The GNU Java bytecode interpreter.
 GIJ is not limited to interpreting bytecode. It includes a class loader which
 can dynamically load shared objects, so it is possible to give it the name
 of a class which has been compiled and put into a shared library on the
 class path.
(new) gnat-3.2-doc_3.2-0pre3_all.deb optional doc
Documentation for the GNU Ada compiler (gnat).
 Documentation for the GNU Ada compiler in info format.
(new) gnat-3.2_3.2-0pre3_i386.deb optional devel
The GNU Ada compiler.
 This is the GNU Ada compiler, which compiles Ada on platforms supported
 by the gcc compiler. It uses the gcc backend to generate optimized code.
(new) gobjc-3.2_3.2-0pre3_i386.deb optional devel
The GNU Objective-C compiler.
 This is the GNU Objective-C compiler, which compiles
 Objective-C on platforms supported by the gcc compiler. It uses the
 gcc backend to generate optimized code.
libffi2-dev_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libffi2-dev_3.2-0pre3_i386.deb
libffi2_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libffi2_3.2-0pre3_i386.deb
libg2c0_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libg2c0_3.2-0pre3_i386.deb
libgcc1_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libgcc1_3.2-0pre3_i386.deb
(new) libgcj-common_3.2-0pre3_i386.deb optional libs
Java runtime library (common files)
 This package contains files shared by classpath and libgcj libraries.
libgcj3-dev_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libgcj3-dev_3.2-0pre3_i386.deb
libgcj3_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libgcj3_3.2-0pre3_i386.deb
libgnat3.15a_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libgnat3.15a_3.2-0pre3_i386.deb
libobjc1_3.2-0pre3_i386.deb
  to pool/main/g/gcc-3.2/libobjc1_3.2-0pre3_i386.deb
(new) libstdc++5-dbg_3.2-0pre3_i386.deb extra devel
The GNU stdc++ library version 3 (debugging files)
 This package contains the shared library of libstdc++ compiled with
 debugging symbols.
(new) libstdc++5-dev_3.2-0pre3_i386.deb optional devel
The GNU stdc++ library version 3 (development files)
 This package contains the headers and static library files necessary for
 building C++ programs which use libstdc++. Be advised that this only works
 with the GNU C++ compiler (version 3.0), and no earlier library will work it.
(new) libstdc++5-doc_3.2-0pre3_all.deb optional doc
The GNU stdc++ library version 3 (documentation files)
 This package contains documentation files for the GNU stdc++ library.
 .
 One set is the distribution documentation, the other set is the
 source documentation including a namespace list, class hierarchy,
 alphabetical list, compound list, file list, namespace members,
 compound members and file members.
(new) libstdc++5-pic_3.2-0pre3_i386.deb extra devel
The GNU stdc++ library version 3 (shared library subset kit)
 This is used to develop subsets of the libstdc++ shared libraries for
 use on