Why does GCC convert short operation to short unsigned?

2011-06-17 Thread Bingfeng Mei
Hi, I noticed that GCC converts short arithmetic to unsigned short. short foo2 (short a, short b) { return a - b; } In .gimple file: foo2 (short int a, short int b) { short int D.3347; short unsigned int a.0; short unsigned int b.1; short unsigned int D.3350; a.0 = (short unsigned i

Re: Why does GCC convert short operation to short unsigned?

2011-06-17 Thread Richard Guenther
On Fri, Jun 17, 2011 at 11:14 AM, Bingfeng Mei wrote: > Hi, > I noticed that GCC converts short arithmetic to unsigned short. > > short foo2 (short a, short b) > { >  return a - b; > } > > In .gimple file: > > foo2 (short int a, short int b) > { >  short int D.3347; >  short unsigned int a.0; >  s

Re: Why does GCC convert short operation to short unsigned?

2011-06-17 Thread Paul Koning
On Jun 17, 2011, at 5:26 AM, Richard Guenther wrote: > On Fri, Jun 17, 2011 at 11:14 AM, Bingfeng Mei wrote: >> Hi, >> I noticed that GCC converts short arithmetic to unsigned short. >> >> short foo2 (short a, short b) >> { >> return a - b; >> } >> >> In .gimple file: >> >> foo2 (short int a

Re: Why does GCC convert short operation to short unsigned?

2011-06-17 Thread Richard Guenther
On Fri, Jun 17, 2011 at 12:56 PM, Paul Koning wrote: > > On Jun 17, 2011, at 5:26 AM, Richard Guenther wrote: > >> On Fri, Jun 17, 2011 at 11:14 AM, Bingfeng Mei wrote: >>> Hi, >>> I noticed that GCC converts short arithmetic to unsigned short. >>> >>> short foo2 (short a, short b) >>> { >>>  ret

MULTILIB_EXTRA_OPTS and LIBGCC2_CFLAGS

2011-06-17 Thread Paulo J. Matos
Hi all, I am quite confused about the difference between the above two options in Makefile fragments. They both seem to be doing the same thing which is to set the options to build libgcc2 with. The only thing that comes to mind is that LIBGCC2_CFLAGS only applies to the main library and M

PIE and FSF gcc

2011-06-17 Thread Jack Howarth
What is the current state of supporting hardened operating systems that default to -fpie/-fPIE/-pie in gcc trunk? Do those releases still use their own patches for gcc or has all of those changes been committed to gcc trunk? If so, does anyone recall the specific commits? In particular, I am i

Re: MULTILIB_EXTRA_OPTS and LIBGCC2_CFLAGS

2011-06-17 Thread Ian Lance Taylor
"Paulo J. Matos" writes: > I am quite confused about the difference between the above two options > in Makefile fragments. > > They both seem to be doing the same thing which is to set the options > to build libgcc2 with. > > The only thing that comes to mind is that LIBGCC2_CFLAGS only applies >

Re: MULTILIB_EXTRA_OPTS and LIBGCC2_CFLAGS

2011-06-17 Thread Paulo J. Matos
On 17/06/11 15:22, Ian Lance Taylor wrote: LIBGCC2_CFLAGS applies only to libgcc (all multilib versions of libgcc). MULTILIB_EXTRA_OPTS applies to all target libraries (libstdc++, libjava, libgo, etc.). Thanks for clearing that up for me. Since I am focused on the C frontend only I actually

Re: PIE and FSF gcc

2011-06-17 Thread Ian Lance Taylor
Jack Howarth writes: > What is the current state of supporting hardened operating systems > that default to -fpie/-fPIE/-pie in gcc trunk? Do those releases still use > their own patches for gcc or has all of those changes been committed to gcc > trunk? > If so, does anyone recall the specif

LIBGCC2_FLAGS not used by libgcc2 configure?

2011-06-17 Thread Paulo J. Matos
Hi, There are some flags that are needed by the target to build libgcc2. I am keeping those in TARGET_LIBGCC2_FLAGS. However, compilation is failed even before the building begins because configure fails. While trying to compile test programs configure is using TARGET_LIBGCC2_FLAGS. This see

Middle end warnings cascading after C++ parsing errors

2011-06-17 Thread Diego Novillo
I am looking at an internally reported bug against 4.6 that starts with something like this: $ cat a.cc int bar(int); struct B {    B(int);    ~B() __attribute__((noreturn)); }; int foo(void) {  B::B f(10);  return 0; } int bar(int j) {  B(10); } $ ./cc1plus -Wall -Werror a.cc  int foo() a.cc:

Re: Middle end warnings cascading after C++ parsing errors

2011-06-17 Thread Diego Novillo
On Fri, Jun 17, 2011 at 14:47, Diego Novillo wrote: > if (flag_syntax_only || flag_wpa) >   return; > > to > >  if (flag_syntax_only || flag_wpa || errorcount > 0) >   return; To clarify. It would be 'seen_error ()' instead of 'errorcount > 0', but the idea is the same. Diego.

Re: PIE and FSF gcc

2011-06-17 Thread Jack Howarth
On Fri, Jun 17, 2011 at 07:30:43AM -0700, Ian Lance Taylor wrote: > Jack Howarth writes: > > > What is the current state of supporting hardened operating systems > > that default to -fpie/-fPIE/-pie in gcc trunk? Do those releases still use > > their own patches for gcc or has all of those ch

Re: Middle end warnings cascading after C++ parsing errors

2011-06-17 Thread Jason Merrill
On 06/17/2011 10:55 AM, Diego Novillo wrote: On Fri, Jun 17, 2011 at 14:47, Diego Novillo wrote: if (flag_syntax_only || flag_wpa) return; to if (flag_syntax_only || flag_wpa || errorcount> 0) return; To clarify. It would be 'seen_error ()' instead of 'errorcount> 0', but the id

attribute((mode(byte))) no longer works in typedef

2011-06-17 Thread Paul Koning
In GCC 3.3.3, I had a typedef with attribute((mode(byte))) on it. That worked (the resulting type had size 1). In GCC 4.5.1, this no longer works; the attribute is silently ignored. It does work when used on a variable declaration directly, but for the many lines of code that relied on the ty

BOOT_LDFLAGS outside of gcc subdirectory

2011-06-17 Thread Jack Howarth
Why aren't the BOOT_LDFLAGS settings honored outside of the gcc build subdirectory? On darwin, we are now setting... BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;` in config/mh-darwin, and while the generated toplevel Makefile shows... LDFLAGS="$(POS

Re: attribute((mode(byte))) no longer works in typedef

2011-06-17 Thread Richard Henderson
On 06/17/2011 08:54 AM, Paul Koning wrote: > In GCC 3.3.3, I had a typedef with attribute((mode(byte))) on it. That > worked (the resulting type had size 1). > > In GCC 4.5.1, this no longer works; the attribute is silently ignored. It certainly does work. libgcc relies on it. You'll have to

Re: attribute((mode(byte))) no longer works in typedef

2011-06-17 Thread Paul Koning
On Jun 17, 2011, at 2:15 PM, Richard Henderson wrote: > On 06/17/2011 08:54 AM, Paul Koning wrote: >> In GCC 3.3.3, I had a typedef with attribute((mode(byte))) on it. That >> worked (the resulting type had size 1). >> >> In GCC 4.5.1, this no longer works; the attribute is silently ignored. >

gcc-4.6-20110610 doesn't build on mac os x 10.6 64bit

2011-06-17 Thread Grzegorz Jaśkiewicz
make[5]: Nothing to be done for `all'. makeinfo --split-size=500 --split-size=500 --split-size=500  -I ../.././libgomp/../gcc/doc/include -I ../.././libgomp -o libgomp.info ../.././libgomp/libgomp.texi /bin/sh ./libtool --tag=CC   --mode=compile /Users/gj/Projects/gcc/gcc-4.6-20110610/h

arm thumb prologue not in rtl?

2011-06-17 Thread Richard Henderson
Is there a good technical reason why thumb prologue is still in text, not rtl? This is, unfortunately, the only dwarf2-capable target that outputs anything substantial in the prologue that has actually been updated to handle dwarf2 cfi info. If I tried to convert it to rtl, what obstacles would

gcc-4.6-20110617 is now available

2011-06-17 Thread gccadmin
Snapshot gcc-4.6-20110617 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.6-20110617/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.6 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches

Re: LIBGCC2_FLAGS not used by libgcc2 configure?

2011-06-17 Thread Ian Lance Taylor
"Paulo J. Matos" writes: > There are some flags that are needed by the target to build libgcc2. I > am keeping those in TARGET_LIBGCC2_FLAGS. However, compilation is > failed even before the building begins because configure fails. While > trying to compile test programs configure is using > TARG

Re: BOOT_LDFLAGS outside of gcc subdirectory

2011-06-17 Thread Ian Lance Taylor
Jack Howarth writes: >Why aren't the BOOT_LDFLAGS settings honored outside of the gcc build > subdirectory? > On darwin, we are now setting... > > BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; > esac;` > > in config/mh-darwin, and while the generated toplevel Mak

Re: gcc-4.6-20110610 doesn't build on mac os x 10.6 64bit

2011-06-17 Thread Ian Lance Taylor
Grzegorz Jaśkiewicz writes: > /Users/gj/Projects/gcc/gcc-4.6-20110610/host-x86_64-apple-darwin10.7.4/gcc/xgcc > -B/Users/gj/Projects/gcc/gcc-4.6-20110610/host-x86_64-apple-darwin10.7.4/gcc/ > -B/usr/local/x86_64-apple-darwin10.7.4/bin/ > -B/usr/local/x86_64-apple-darwin10.7.4/lib/ -isystem > /usr