This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

egcs 1.1.2 (egcs-2.91.66) Assembler error(?)


g++ bug report:

Reporter : Aki Niimura  neko@my-dejanews.com
Date : 04/08/99

g++ version : egcs 1.1.2 (egcs-2.91.66)
Environment :
%uname -a
SunOS Evelyn 5.7 Generic sun4m sparc SUNW,SPARCstation-4  (Solaris Sparc)

%uname -a
SunOS kifer 5.7 Generic i86pc i386 i86pc  (Solaris x86)

Bug(?) description :
I'm getting assembler syntax errors when I complied under Solaris x86 the
program which is complied w/o errors under Solaris Sparc.
I know '$' character is causing this. However, I'm wondering why it
works with Sparc but doesn't work with Solaris x86.
Because gcc uses an unified assembler.
Is there any workaround to make this work?
Any suggestions, comments are highly appreciated. (Yes! I need a
workaround.)

      1 #include <iostream.h>
      2
      3 char $string[] = "Here we are.";
      4
      5 class A {
      6 public:
      7     A() { };
      8
      9     void print() { cout << "object A " << $string << endl; };
     10 };
     11
     12 A $B;
     13
     14 int
     15 main()
     16 {
     17     A $A;
     18
     19     $A.print();
     20     $B.print();
     21 }

// execution result
% g++ test.cc  (under Solaris Sparc)
g++ test.cc
% a.out
object A Here we are.
object A Here we are.

% g++ test.cc  (under Solaris x86)
Assembler: test.cc
    aline 5 : syntax error
    aline 7 : syntax error
    aline 8 : syntax error
    aline 9 : syntax error
    aline 35    : syntax error
    aline 47    : syntax error
    aline 49    : syntax error
    aline 50    : syntax error
    aline 51    : syntax error




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