This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: *-rtems and binutils 2.14.92


Daniel Jacobowitz wrote:

On Tue, May 11, 2004 at 02:48:09PM -0500, Joel Sherrill wrote:

So you would consider this a gcc bug?


That depends on what produced it!


This is from a piece in the bowels of RTEMS which processes message priority to know when it can prepend or append instead of trying to insert the hard way based upon priority.

Through the magic of #define's, this is what a cut down of the
cpp output looked like:

void f( int );
void g( int );
void h( int s ) {
  switch ( s ) {
    case 2147483647:        f( s ); break;
    case (-2147483647 - 1): g( s ); break;
    default:                        break;
  }
}

The switch values are on an integer field with these two
special values before the default.

#define  CORE_MESSAGE_QUEUE_SEND_REQUEST   INT_MAX
#define  CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN

So it looks to me that it is a comparison on INT_MIN which is blowing
up.  Which is confirmed by this:

#include <limits.h>
int f( int s )
{
  if ( s == INT_MIN )
    return 1;
  return 0;
}

which also blows up the same way. binutils or gcc bug? :)

--joel




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