Assembler Problem with gcc 2.95.[23]

From: Dieter Meinert <dieter.meinert_at_aip.de>
Date: Fri, 29 Jun 2001 11:17:46 +0200 (MEST)

-----BEGIN PGP SIGNED MESSAGE-----


Hi folks,
I need one of the above compilers to create some foreign code,
and I run into the following problem:

the assembler tells me "line too long" and several oyther
messages on one file, with assembler code generated for
debugging.
(see app. 1 for compiler flags and error message)

I do not use any debug options on the program, so where is this
code generated ?

Does anyone know a workaround or a means to suppress the
generation of debug code ?
(see app.2,3 for program code, all other includes are either
system or used in other, working programs as well)

Tschüß,
                                                Dieter
 
  _____________________________*__________________________________
 / * dieter.meinert_at_aip.de \
 \ Dieter Meinert (- ** http://www.aip.de/~dieter/ \
  \__________________A______*__*___________________________________/
           (public pgp key from http://www.aip.de/~dieter/)

===Excerpt from File build_log===

...
g++ -c -g -Wall -W -Werror -DNAGf90Fortran -fPIC -DTRACE -DUSE_POPUP -imacros /vol/.src4/sas/xmmsas_20010624_1841/config.h -I/vol/.src4/sas/xmmsas_20010624_1841/include -I/vol/.src4/sas/xmmsas_20010624_1841/include/utils -I. SuppressHandler.cc
as0: Warning: SuppressHandler.cc, line 6: Line too long
      .align 5Zt24__default_alloc_template2b0i0Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt10_Select1st1Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt4less1Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt9allocator1ZiRCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0
as0: Warning: SuppressHandler.cc, line 6: Line too long
      .ent __t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_tem!
plate2b0i0ZiZRt4pair2ZCt12basic_
strin
as0: Error: SuppressHandler.cc, line 6: undefined assembler operation: __t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12bas!
ic_string3ZcZt18string_char_trai
ts1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt
as0: Warning: SuppressHandler.cc, line 6: Line too long
      ldgp $29,0($27)_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt
as0: Error: SuppressHandler.cc, line 6: undefined assembler operation: $__t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZt17_Rb_tree_iterator3Zt4pair2ZCt12ba!
sic_string3ZcZt18string_char_tra
its1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZ
as0: Warning: SuppressHandler.cc, line 6: Line too long
     $LFE29:r_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiRCt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZiZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zi
as0: Warning: SuppressHandler.cc, line 6: .ent/.end block never defined the procedure name
make[6]: *** [SuppressHandler.o] Error 1
make[6]: Leaving directory `/vol/.src4/sas/xmmsas_20010624_1841/packages/error/src'
make[5]: *** [libs.here] Error 2
make[5]: Leaving directory `/vol/.src4/sas/xmmsas_20010624_1841/packages/error/src'
make[4]: *** [bin] Error 2
make[4]: Leaving directory `/vol/.src4/sas/xmmsas_20010624_1841/packages/error'
...
============================================================

===File SuppressHandler.cc===
// -*-C++-*-
//
// File: SuppressHandler.cc
// Author: Jorgo Bakker (jbakker_at_astro.estec.esa.nl)
// Generated: Mon Nov 6 10:05:12 MET 2000

#include "SuppressHandler.h"
#include <freezestream.h>
#include <cstdlib> // getenv


SuppressHandler::SuppressHandler() :
  _all(false),_number(-1)
{
  /* check the environment: if set, silence all warnings */
  
  if(getenv("SAS_SUPPRESS_WARNING") != 0) {
    string c;
    strstream ss;
    ss << getenv("SAS_SUPPRESS_WARNING");
    while (ss >> c) ignore(c);
  }
}

SuppressHandler::~SuppressHandler()
{
}

void SuppressHandler::ignore(const Code& c)
{
  int counter=-1;
  {
    strstream ss;
    ss << c;
    ss >> counter;
  }
  
  if (c.empty() || counter == 0) _all=true;
  else if (counter > 0) _number=counter;
  else _list[c]=1;
}

void SuppressHandler::allow (const Code& c)
{
  int counter=-1;
  {
    strstream ss;
    ss << c;
    ss >> counter;
  }
  
  if (c.empty() || counter == 0) {
    _all=false;
    _list.clear();
  }
  else if (counter > 0) _number=counter;
  else _list.erase(c);
}

bool SuppressHandler::suppress(const Code& c)
{
  int number= ++_map[c];

  // ignore all?
  if (_all) return true;

  
  // ignore registered code?
  if (_list[c]) return true;


  // ignore after n times?
  if (_number > -1) return ( (number > _number)?true:false );

  // default
  return false;
}

string SuppressHandler::statistics()
{
  ostrstream ss;
  bool silenced=false;
  string s;

  for (map<Code,int>::iterator it=_map.begin();it != _map.end();it++) {
    int number=0;
    
    // count the number of times a warning is silenced
    if (_all) number=(*it).second;
    else if (_list[(*it).first]) number=(*it).second;
    else if (_number > 0) number=(*it).second - _number;

    if ( number > 0 ) {
      ss << "\n warning " << (*it).first
         << " silently occurred " << number << " times";
      silenced=true;
    }
  }

  if (silenced) {
    ss << ends;
    s=freezestream(ss);
  }
  return s;
}

void SuppressHandler::reset()
{
  _map.clear();
}

string SuppressHandler::options()
{
  ostrstream ss;
  
  if (_all) {
    ss << " -w";
  }
  else {
    // specify all codes that need to be silenced by default
    for (map<Code,int>::iterator it=_list.begin();it != _list.end();it++)
      if ((*it).second) ss << " -w " << (*it).first;
    
    // specify # warnings
    if (_number > -1) ss << " -w " << _number;
  }
  ss << ends;

  return freezestream(ss);
}
============================================================

===File SuppressHandler.h===
// -*-C++-*-
//
// File: SuppressHandler.h
// Author: jbakker
// Generated: Tue Feb 8 17:35:17 MET 2000

#ifndef SuppressHandler_h
#define SuppressHandler_h

#include "Msg.h"

#include <string>
#include <map>


class SuppressHandler
{
public:
  SuppressHandler();
  ~SuppressHandler();

  /* adds Code to the list of ignored Codes. Note:
     - Code can be a string "NoAttitudeData"
     - Code can be empty (""), meaning all Code must be ignored
     - Code can contain a number ("N"), meaning after N occurences, all Code
       must be ignored
  */
  void ignore(const Code& c);

  /* removes Code from the list of ignored Codes. Note:
     -if Code is empty (""), we go back to default state
     -if Code is a number ("N"), allow N Codes to appear
  */
  void allow(const Code& c);

  /* true if we want to show this message */
  bool suppress(const Code& c);

  /* create statistics skipped Codes */
  string statistics();

  /* reset the internals to its starting state (with possible Codes set) */
  void reset();

  /* create s string of command line switches */
  string options();

protected:
  // only derived classes can use these

private:
  // member functions
  SuppressHandler(const SuppressHandler&); // copy constructor (disabled)
  SuppressHandler& operator=(const SuppressHandler&); // assignment (disabled)


  // member data
  map<Code,int> _map; // statistics
  map<Code,int> _list; // all codes that need to be shut up
  bool _all; // is set when all warnings must be silenced
  int _number; // number of times any warning may occur before
                             // it is silenced
};



#endif
============================================================

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1

iQCVAwUBOzxHuvYksnFoaQ6JAQG+iwP+Mnh54U/4fwC7nFFMig0A06YSEVCnW+Pg
QzXGowc/y9ke36bLgLzjpbxY1ZJHmNM53qutdHGp5RCk27BQPTKaZ5vOEYS5Xu0u
YIUgqpMoIImqsh8YX+BVtugtZEFxztGFXlQGphYlI3/Lvw7BXs+tZEONotR7eogd
nESBvPgH9Ek=
=+J+0
-----END PGP SIGNATURE-----
Received on Fri Jun 29 2001 - 09:20:05 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT