Anthony Shipman | 1 Jan 2006 07:18
Picon
Picon

the "general" floating point format

Is there a precise specification of how printf() decides whether to use the 
fixed point or scientific format when the format is "general"?
--

-- 
Anthony Shipman                    Mamas don't let your babies 
als <at> iinet.net.au                   grow up to be outsourced.

Dima Sorkin | 1 Jan 2006 12:39
Picon

makefile generation with gcc

Hi.
 This change of gcc4 vs gcc3 makes some problems for me:
  gcc3: with -MM -MP: missing header files are ignored.
  gcc4: with -MM -MP:  if some header file not found - it results in error.
           with -MM -MP -MG: all names of missing headers are written as is.

  I want to auto-generate dependencies between my header-files.
Some of my header files include headers from external libraries of huge size
(for example "BOOST C++ lib").

gcc4 -MM -MP:
1)  If I give to gcc4 only the paths to my headers' locations (with -I option),
it does not find headers from external libs, which results in error.

 I tried the "gcc4 -MM -MP -MG", but there is another problem:
2) gcc4 adds phony targets for missing headers too. When running "make",
"make" does not find these targets (as they are also not on it's path),
so it decides to update them (by empty rule). This, on each "make" invocation,
results in recompilation of the whole project, as "missing" headers become
more "updated" then all real targets in makefile.

3) If I give to gcc4 also the paths to external libs headers, everything
works just fine. But it results into huge dependency lists - tens of kilobytes
and more per ".o" target, as it writes amounts of "external" headers into the
makefile.

Is there a way to cause gcc4 ignore missing headers like the gcc3 did?
Or other solution ?

Thank you,
(Continue reading)

Luca Dona | 1 Jan 2006 23:39
Picon

Argument list too long

Build fails on Mac OS 10.4.2 Xcode2 with the following error message:

powerpc-apple-darwin8-gcc-4.0.1: installation problem, cannot exec '/ 
usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1plus': Argument list  
too long

It's a small project imported from CW.

What should I try?

Ian Lance Taylor | 2 Jan 2006 04:48
Gravatar

Re: the "general" floating point format

Anthony Shipman <als <at> iinet.net.au> writes:

> Is there a precise specification of how printf() decides whether to use the 
> fixed point or scientific format when the format is "general"?

I assume you are referring to %g.  The answer is yes.  From the
GNU/Linux man page, for example (man 3 printf):

    The double argument is converted in style f or e (or F or E for G
    conversions).  The precision specifies the number of significant
    digits.  If the precision is missing, 6 digits are given; if the
    precision is zero, it is treated as 1.  Style e is used if the
    exponent from its conversion is less than -4 or greater than or
    equal to the precision.  Trailing zeros are removed from the
    fractional part of the result; a decimal point appears only if it
    is followed by at least one digit.

Ian

Kevin Myers | 2 Jan 2006 06:47

Console I/O Help with g77

Hello,

I am new to g77, and am attempting to convert a program that ran under VS
Fortran on an IBM mainframe.  I have converted most of the program without
difficulty, but am having some problems related to console I/O.  I am using
g77 under Windows 2000.

The mainframe version of the program to be converted contains a number of
lines similar to the following:

      CALL CMS(IRC,'CLRTERM ')

These calls are used to clear the screen on IBM 3270 style terminals prior
to subsequent output.  Is there an equivalent g77 command that be used to
clear the contents of the console (e.g. issue a form feed?)?

The mainframe version of the program also contains numerous chunks of code
similar to the following:

 1315 REWIND 5
 1411 WRITE(7,1412) PCS
 1412 FORMAT(' ','Surface casing pressure (psi): ',F6.0)
      READ(5,*,ERR=1411,END=1415) PCS

g77 doesn't seem to allow a REWIND for unit 5 (console input).  Without the
REWIND there doesn't seem to be any way to detect and handle null input
(which is very important in this program to accept numerous default values).
Is there some way to do this that I am missing?

Finally, a portion of this program is intended to write output to a standard
(Continue reading)

Kevin Myers | 2 Jan 2006 06:53

Re: Console I/O Help with g77

P.S. - I don't know if this address is for a mailing list.  If so, I am not
subscribed.  Therefore, I would appreciate a direct reply.

----- Original Message ----- 
From: "Kevin Myers" <KMyers <at> ProcomInc.net>
To: <gcc-help <at> gcc.gnu.org>
Sent: Sunday, January 01, 2006 11:47 PM
Subject: Console I/O Help with g77

> Hello,
>
> I am new to g77, and am attempting to convert a program that ran under VS
> Fortran on an IBM mainframe.  I have converted most of the program without
> difficulty, but am having some problems related to console I/O.  I am
using
> g77 under Windows 2000.
>
> The mainframe version of the program to be converted contains a number of
> lines similar to the following:
>
>       CALL CMS(IRC,'CLRTERM ')
>
> These calls are used to clear the screen on IBM 3270 style terminals prior
> to subsequent output.  Is there an equivalent g77 command that be used to
> clear the contents of the console (e.g. issue a form feed?)?
>
>
> The mainframe version of the program also contains numerous chunks of code
> similar to the following:
>
(Continue reading)

Anthony Shipman | 2 Jan 2006 07:39
Picon
Picon

Re: the "general" floating point format

On Mon, 2 Jan 2006 02:48 pm, Ian Lance Taylor wrote:
> Anthony Shipman <als <at> iinet.net.au> writes:
> > Is there a precise specification of how printf() decides whether to use
> > the fixed point or scientific format when the format is "general"?
>
> I assume you are referring to %g.  The answer is yes.  From the
> GNU/Linux man page, for example (man 3 printf):
>
>     The double argument is converted in style f or e (or F or E for G
>     conversions).  The precision specifies the number of significant
>     digits.  If the precision is missing, 6 digits are given; if the
>     precision is zero, it is treated as 1.  Style e is used if the
>     exponent from its conversion is less than -4 or greater than or
>     equal to the precision.  Trailing zeros are removed from the
>     fractional part of the result; a decimal point appears only if it
>     is followed by at least one digit.
>
> Ian

Oh, I missed that bit in the middle. Is that the C standard or just how Gnu C 
does it? 

Do you know if libstdc++ uses exactly the same specification or perhaps 
delegates to printf()? (I started off searching for how the C++ "general" 
format was defined).

--

-- 
Anthony Shipman                    Mamas don't let your babies 
als <at> iinet.net.au                   grow up to be outsourced.

(Continue reading)

Ian Lance Taylor | 2 Jan 2006 08:09
Gravatar

Re: the "general" floating point format

Anthony Shipman <als <at> iinet.net.au> writes:

> Oh, I missed that bit in the middle. Is that the C standard or just how Gnu C 
> does it? 

It is the C standard.  Note that this is implemented in the C library,
which is not part of GCC.

> Do you know if libstdc++ uses exactly the same specification or perhaps 
> delegates to printf()? (I started off searching for how the C++ "general" 
> format was defined).

libstdc++ delegates to printf.

Ian

Favicon

The Extension IDE - EXTEIDE


EXTEIDE is freeware. Anyone can download now.

Please visit http://www.exteide.com

Thanks.

--
Sent from the gcc - Help forum at Nabble.com:
http://www.nabble.com/The-Extension-IDE---EXTEIDE-t835750.html#a2166862

John Love-Jensen | 2 Jan 2006 13:46
Picon
Favicon

Re: GCC and my G4

Hi Ceilti,

> I was told that OS X came bundled with GCC, but mine didn't, and
> after browsing through these pages perhaps this is only true of iMacs
> with G5 cpu?

Xcode (which includes GCC) is bundled on your OS X CDs, but not
pre-installed on your machine.

If you need to, you can download Xcode from Apple's website
(http://www.apple.com/).

www.apple.com
Developer
Software Downloads: Mac OS X Development Tools
Download Xcode 2.2

> 1. - I am thinking about exchanging my G4 for a G5 if this is the
> only way to get GCC. I guess I'm talking about a compiled version of
> GCC. I am unsure of my abilities to compile it myself.

I use Xcode (which includes GCC) on G3, G4 and G5 machines.

> 2. - Will GCC work OK on my G4? if so is there compiling help
> available to me?  (both for compiling GCC and for using it for
> compiling the above games?

GCC will work OK on your G4.

I recommend using Apple's pre-compiled GCC, since it has been instrumented
(Continue reading)


Gmane