bootstrap 4.0-200503005: flag_unsafe_math_optimizations undeclared

2005-03-16 Thread Jason Mancini
Using binutils 2.15.96 and gcc 3.4.3... where have I gone wrong?
-Jason
gcc -c   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC   -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -Wno-error  -DHAVE_CONFIG_H -DGENERATOR_FILE-I. 
-Ibuild -I../../gcc-4.0-20050305/gcc -I../../gcc-4.0-20050305/gcc/build 
-I../../gcc-4.0-20050305/gcc/../include 
-I../../gcc-4.0-20050305/gcc/../libcpp/include  \
-o build/insn-conditions.o insn-conditions.c
insn-conditions.c:97: error: `flag_unsafe_math_optimizations' undeclared 
here (not in a function)
insn-conditions.c:97: error: initializer element is not constant
insn-conditions.c:97: error: (near initialization for 
`insn_conditions[10].value')
insn-conditions.c:97: warning: missing initializer
insn-conditions.c:97: warning: (near initialization for 
`insn_conditions[10].value')
insn-conditions.c:97: error: initializer element is not constant
insn-conditions.c:97: error: (near initialization for `insn_conditions[10]')
...




RE: bootstrap 4.0-200503005: flag_unsafe_math_optimizations undeclared

2005-03-16 Thread Jason Mancini
insn-conditions.c:97: error: `flag_unsafe_math_optimizations' undeclared 
here
Using binutils 2.15.96 and gcc 3.4.3... where have I gone wrong?
Of course if I would have searched the archives first, I would know
that I need a new gawk most likely.  [argh]
-Jason



Re: GCC 4.1: Buildable on GHz machines only?

2005-05-05 Thread Jason Mancini
A little humor from a long time ML lurker...
Via C3-2 Nehemiah 1GHz 512MB ddr
$ ../gcc-4.0.0/configure --prefix=/home/jason/local/gcc-400 --enable-shared 
\
--enable-threads=posix --disable-checking --enable-long-long 
--enable-__cxa_atexit \ --enable-clocale=gnu --disable-libunwind-exceptions 
--enable-languages=c --with-system-zlib

$ time make bootstrap
...
3860.71user 245.24system 1:10:05elapsed 97%CPU
0inputs+0outputs (6698major+12862842minor)pagefaults 0swaps
$ strip gcc ; upx -9 gcc ; ls -l gcc
-rwxr-xr-x  1 jason jason 42672 May  5 23:07 gcc
So the bootstrap process generates a useful 10 bytes/second.  ;-)
But seriously, GCC and various language standards have kept up with modern 
hardware.
If someone takes a GCC release and hacks up a release to run on 50MHz boxes 
from years
gone by, that's great, but I think the main GCC devs shouldn't worry about 
it because
GCC is more about flexibility and extensibility than slim and trim I'd say.  
Perhaps there
should be an "embedded GCC" team that focuses on a separate light-weight 
C/C++ project.

Many thanks for GCC!
-Jason, back to lurking.



RE: gcc template error?

2005-06-22 Thread Jason Mancini

I suspect this line is the source of your problems:
  friend T* func(T* p);
Y isn't a template parameter here, but a (concrete?) class named "Y".
The below compiles with 3.4.3 anyways...
Regards,
-Jason


// Line 1
class A {
public:
  A() { };
  ~A() { };
};


class B {
public:
  B();
  B(const A& a) { };
  ~B();
};


template  class T;

template 
T* func(T* p);


template  class T {
  X*m_;
public:
  T(X* x) : m_(x) { };
  ~T() { };
  friend T* func(T* p);
};


template 
T* func(T* p) {
  return (new T(new X(*p->m_)));
}


int main() {
  A* a = new A();
  T*p = new T(a);
  T*q = func(p);
  return 0;
}




ABI compatibility: GCC9 vs GCC10

2020-02-20 Thread Jason Mancini
Any notable ABI changes from 9 to 10?
Thanks!
-Jason
(Sorry for asking here, there was no response from gcc-help in January.)


small testcase gcc6 + boost optional + Wmaybe-uninit

2016-10-13 Thread Jason Mancini
Web search shows that -Wmaybe-uninitialized is an imprecise check, and  that 
boost::optional is already a known sore spot, but I wanted to pass  along this 
small test case in case the warning's owner wanted to do  further improvements. 
 We solved our one grumpy instance with auto x =  make_optional(0, ...);.  
Something about the loop + conditional +  O1/O2/O3 optimization triggers the 
false positive.  Thanks!   -Jason

//==
// g++ -c sample.cc -O2 -Wall -Werror
// gcc 6.1/6.2 and boost 1.61/1.62
#include 
#include 
int main() {
  boost::optional value;
  for (int x(0); x < 3; ++x) {
    if (random() & 1)
  value = x;
  }
  if (value != boost::none) {
    int result = value.get();
    printf("%d\n", result); // error: '*((void*)& value +4)' may be used 
uninitialized
  }
}
//==


Re: Building on gcc112 is stuck in msgfmt

2017-08-29 Thread Jason Mancini
Been doing stability testing on my x86_64 Ryzen cpu using openSUSE's 
(Tumbleweed) "gcc7.1.1 20170802" + compiling Linux kernel source.  Every so 
often, the build curiously stalls on a futex between cc1 and as.  cc1 is on the 
futex.  as is waiting to read.  Could that hang be related to what's being 
discussed here?


Re: GCC 4.3.2 bug (was: Illegal subtraction in tmp-dive_1.s)‏

2009-04-19 Thread Jason Mancini

> Vincent Lefevre  writes:
>while ((*(q++))-- == 0) ;

Is that defined and legal??  Is q incremented before or after *q is 
decremented?  They are both post operators!
Jason Mancini
_
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009


Re: GCC 4.8.2 Status Report (2013-05-31)

2013-10-04 Thread Jason Mancini
> Status
> ==
> GCC 4.8.1 has been released, the branch is again open
> for regression bugfixes and documentation fixes.
> GCC 4.8.2 could be tentatively released in early September.

Curious user is curious about 4.8.2 status!  :^)