🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1608

Bug in config/i386bsd.h

#1608
From: shap
Date: Fri, 08 Jan 1993 04:46
42 lines
2094 bytes
   I just looked in config/i386/bsd.h (new name for config/i386bsd.h)
   and I don't see any macros with parameters that might be stringified.
   Which macros might have this happen?  Can you send me the preprocessed
   output from a compiler that stringized something unexpectedly?

I included a command in my original mail that should give warnings on
stringification:

   > 	gcc -Wtraditional -I. -I.. -E i386bsd.h > /dev/null

The reason I included the command is because it's the sort of problem
that is hard to spot by eye, and if it exists in this header file it
probably exists in others. By turning on traditional warnings, the gcc
-E command above will give you line numbers and warnings for (among
other things) potential stringification problems.

The offending macros in my copy of i386bsd.h are:

	perform_udivsi3
	perform_divsi3
	perform_umodsi3
	perform_modsi3

In each case, the macro arguments 'a' and 'b' appear within the asm
strings within the macros. Specifically, the strings "=a" and "a"
cause substitution of the macro argument name 'a'.  The problem won't
show up when compiling native under BSD, but it will bite you in some
cross-compiles.

I suppose it's possible that someone has already applied an earlier
bug fix I sent in on this, and has changed the macro arguments to 'aa'
and 'bb'.  Or maybe the macros were moved to another file in your
reorganization?

Anyway, if you look at the indicated macros below, the problem should
be obvious.

Hope that helps.  I can generate bad cpp output for you if you really
want it, or send you a copy of my config/i386bsd.h if it will help.


Jonathan S. Shapiro
Technical Details
Message-ID: <9301080749.AA05239@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!halifax.syncomas.com!shap
References: <9301080705.AA07308@raid.dell.com>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!halifax.syncomas.com!shap
From: shap@halifax.syncomas.com
Subject: Bug in config/i386bsd.h
Message-ID: <9301080749.AA05239@life.ai.mit.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
References: <9301080705.AA07308@raid.dell.com>
Distribution: gnu
Date: Fri, 8 Jan 1993 04:46:00 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 43