public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc with -O2 -mpa-risc-2-0
@ 2001-03-28  5:56 Eric Legrand
  2001-03-28 11:05 ` implicit declaration of static attribute for functions???? Jerry Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Legrand @ 2001-03-28  5:56 UTC (permalink / raw)
  To: gcc-help

Hello,

I use gcc 2.95.2 with gas as it is recommended
in INSTALL file. My gas version is 2.10.

When I compile the source joined hereafter with
"-c -O2 -mpa-risc-2-0" options, it
failed with the error message:
/var/tmp/ccY1tBtT.s: Assembler messages:
/var/tmp/ccY1tBtT.s:36: Error: Invalid operands

If I add ".LEVEL 2.0" in the generated assembly file
and assemble it manually it works (I wonder why gcc
remove .LEVEL directive when assembler is gas...).

Does anybody know if it works with later versions?

Best regards from France.
float f(float x)
{
	float a=3, b=1;

	return a*x + b;
}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* implicit declaration of static attribute for functions????
  2001-03-28  5:56 gcc with -O2 -mpa-risc-2-0 Eric Legrand
@ 2001-03-28 11:05 ` Jerry Miller
  0 siblings, 0 replies; 3+ messages in thread
From: Jerry Miller @ 2001-03-28 11:05 UTC (permalink / raw)
  To: gcc-help

In making enhancements to a very large project,
I found it necessary to make use of a function
that had been short-sightedly made static, and
thus local to the module containing it.  I removed
the static attribute from both the prototype
declaration and the function itself.

I recompiled and relinked, but I got a message
from the linker that the reference was unresolved.
Noting that the function in question was at the
very end of the module, following several static
functions, on a hunch, I cut and pasted to the
very beginning of the module, which solved the
problem!

Why should this be necessary???

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: implicit declaration of static attribute for functions????
@ 2001-03-29 17:53 David Korn
  0 siblings, 0 replies; 3+ messages in thread
From: David Korn @ 2001-03-29 17:53 UTC (permalink / raw)
  To: 'Jerry Miller', gcc-help

>-----Original Message-----
>From: Jerry Miller [ mailto:gmiller@cs.sunysb.edu ]
>Sent: 28 March 2001 19:51

>    [SNIP!]    I removed
>the static attribute from both the prototype
>declaration and the function itself.
>
>I recompiled and relinked, but I got a message
>from the linker that the reference was unresolved.
>Noting that the function in question was at the
>very end of the module, following several static
>functions, on a hunch, I cut and pasted to the
>very beginning of the module, which solved the
>problem!

  Unless you can reproduce this, I'd assume that something went 
wrong with your dependencies and it didn't get rebuilt properly the 
first time.

       DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-03-29 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28  5:56 gcc with -O2 -mpa-risc-2-0 Eric Legrand
2001-03-28 11:05 ` implicit declaration of static attribute for functions???? Jerry Miller
2001-03-29 17:53 David Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).