[Expat-bugs] [ expat-Bugs-692878 ] FASTCALL problem with Solars/gcc

SourceForge.net noreply at sourceforge.net
Tue Feb 25 13:41:22 EST 2003


Bugs item #692878, was opened at 2003-02-25 13:27
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=692878&group_id=10127

Category: None
Group: Platform Specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Rolf Ade (pointsman)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: FASTCALL problem with Solars/gcc

Initial Comment:

Talking about 1.95.6 (of course, prior to that, the
FASTCALL macro was a noop, if I recall right).

I got two independend reports about compiler warnings,
while compiling expat with gcc under Solaris. The one
specified his gcc version (2.7.2.3) without saying the
exact Solaris Version, the other uses Solaris 2.6 and a
not specified gcc version. Both get plenty of similar
warning like this:

In file included from ../expat/xmlrole.h:14,
                 from ../expat/xmlrole.c:14:
../expat/xmltok.h:143: warning: `regparm' attribute
directive ignored
../expat/xmltok.h:144: warning: `regparm' attribute
directive ignored
../expat/xmltok.h:149: warning: `regparm' attribute
directive ignored
....

It seems, the FASTCALL macro in internal.h is the
source of the trouble.

rolf


----------------------------------------------------------------------

>Comment By: Rolf Ade (pointsman)
Date: 2003-02-25 21:41

Message:
Logged In: YES 
user_id=13222

Freds patch fixed the problem for both reporters:

"Works fine now {
  uname -a
  SunOS Develop 5.6 Generic_105181-32 sun4u sparc
  gcc -v
  Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.3/specs
  gcc version 2.7.2.3
}"

and

"Works for me now as well (gcc v 2.8.1)"

Thanks!
rolf



----------------------------------------------------------------------

Comment By: Rolf Ade (pointsman)
Date: 2003-02-25 16:26

Message:
Logged In: YES 
user_id=13222

I've handed the patched version to the original reporters.
Will report about the results (if I get answer).

Re regparm(2) instead of regparm(3). There isn't a value in
using regparm by itself. I think it only makes sense, to use
this, if it in deed speeds up things at least a little bit
(this seems not guaranteed, as Karls result on w32 shows).
If I recall right, Fred had measured a little speed up on
linux. I guess, it would be better, to find a volunteer,
which checks, if this compiler hints in fact makes a
measurable difference, before we try to play advanced tricks.

rolf


----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2003-02-25 15:34

Message:
Logged In: YES 
user_id=290026

This seems to affect older compilers?
Maybe a task for the build (autoconf?).

One could also try regparm(2) instead of regparm(3).
Assuming these compilers recognize regparm at all.

Karl

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2003-02-25 15:24

Message:
Logged In: YES 
user_id=3066

I've attached a patch, but I can't test on an equivalent
environment to where you found the problem.  It doesn't
break the build for Linux.  ;-)  If you could test this
patch to the lib/internal.h file from the CVS version of
Expat in the target environments, I'd appreciate knowing if
this fixes the problem.

Thanks!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=692878&group_id=10127



More information about the Expat-bugs mailing list