Multi precision floating point

K

Keith Thompson

jacob navia said:
When you invoke the compiler with
-ansic however, all extensions are disabled, including
this one. The only exception is _stdcall.

Then perhaps most of this discussion has been a waste of time.

Am I correct in thinking that lcc-win with "-ansic" claims to be a
conforming C compiler, and lcc-win without "-ansic" does not?

If so, then the behavior of lcc-win without "-ansic" is of no
particular relevance here. It doesn't matter whether your
implementation of operator overloading conforms to the C standard, or
whether you issue a diagnostic for any constraint violations or syntax
errors that result from using it, because your implementation, in its
mode that supports operator overloading, is not bound by the C
standard.

Or does lcc-win without "-ansic" claim to be a conforming C compiler
with extensions? If so, then how it handles those extensions is
relevant to the question of whether it's a conforming implementation.
 
K

Keith Thompson

Mark McIntyre said:
Ian Collins wrote:
(replying to someone)

Quite possibly.

Does anyone here claim that gcc is a conforming ISO C implementation?

I claim that gcc, with an appropriate set of command-line options, is,
in combination with an appropriate runtime library, a conforming ISO
C90 implementation, apart from bugs. With a different set of
command-line options it approaches being a conforming ISO C99
implementation, but with some significant missing features.
Does anyone here respond to posts with thinly veiled adverts for gcc?

I'll leave that one alone.
 
K

Keith Thompson

Flash Gordon said:
Harald van Dijk wrote, On 01/12/07 10:24:

<snip example>

Make it that it only treats a program as Fortran if it is not a valid
C program and Keith's point still stands.

For example, given an existing conforming C implementation and an
existing conforming Fortran implementation, a wrapper script could try
to invoke the C compiler, and if that fails, try the Fortran compiler.
The wrapper script, in combination with the existing C and Fortran
implementations, would consitute a conforming C implementation that
accepts Fortran as an extension.
 
C

CBFalconer

Richard said:
Well, yes and no. In the original meaning of the word, there is
no consensus, the original meaning being a general accord or
common agreement. Over time a second usage has become common,
typically something like majority agreement. Neither of these
usages apply here. Instead there is a minority of the posters
(the regulars) who have a consensus between themselves about what
is on and off topic in c.l.c. This consensus does not extend to
all people who regularly post to comp.lang.c, nor does it stop
"regulars" from being "off topic".

In short there is a consensus among those posters who agree with
you.

To the contrary, a short time ago a thread gathered opinions on
this subject. The overwhelming majority agreed with keeping c.l.c
ISO standard based.
 
M

Mark McIntyre

Keith said:
I claim that gcc, with an appropriate set of command-line options, is,
in combination with an appropriate runtime library, a conforming ISO
C90 implementation, apart from bugs. With a different set of
command-line options it approaches being a conforming ISO C99
implementation, but with some significant missing features.

And I'll agree with that. The point being, the conforming mode is
topical here, the other isn't.
 
D

Dik T. Winter

> On Sat, 01 Dec 2007 11:14:58 +0000, Mark McIntyre wrote: ....
>
> Yes. It is possible for a compiler to support operator overloading in a
> way that won't miscompile any correct standard C program.

Not only correctly compiling standard conforming programs is a requirement.
You need also to issue the required diagnostics for non-standard conforming
programs.
 
K

Keith Thompson

Dik T. Winter said:
Not only correctly compiling standard conforming programs is a
requirement. You need also to issue the required diagnostics for
non-standard conforming programs.

Yes, specifically for any violation of a constraint or a syntax rule
(and a C-like program that uses operator overloading must violate one
or the other). But once the compiler has issued a single diagnostic,
even if it's something like "Thank you for using this feature", it's
free to go on to generate code for the program.

But that doesn't appear to be much of an issue for the particular
implementation that we've been discussing.
 
J

jacob navia

CBFalconer said:
To the contrary, a short time ago a thread gathered opinions on
this subject. The overwhelming majority agreed with keeping c.l.c
ISO standard based.

No. Heathfield wants C90, not ISO C.
 
K

Keith Thompson

jacob navia said:
CBFalconer wrote: [...]
To the contrary, a short time ago a thread gathered opinions on
this subject. The overwhelming majority agreed with keeping c.l.c
ISO standard based.

No. Heathfield wants C90, not ISO C.

Even if Richard Heathfield prefers C90 to C99, that has nothing to do
with whether C99 is topical. I don't recall him ever suggesting that
C99 should be considered off-topic. (If he had, I certainly would
have expressed my disagreement.)
 
S

santosh

jacob said:
CBFalconer wrote:


No. Heathfield wants C90, not ISO C.

Was it necessary to drop names? This group (as you know) is for C99, C90
(also C95) and C as described in K&R1. Richard has never (as far as I'm
aware) objected to this scope.

BTW are you a member of your national body for C Standardisation? It
would be a much more effective method to propose your ideas than
endless posts to newsgroups.
 
M

Mark McIntyre

CBFalconer said:
To the contrary, a short time ago a thread gathered opinions on
this subject. The overwhelming majority agreed with keeping c.l.c
ISO standard based.

Indeed, but did you expect a Troll to be accurate? Best just to ignore him.
 
M

Mark McIntyre

jacob navia wrote:
CBF wrote
No. Heathfield wants C90, not ISO C.

Richard is not an overwhelming majority. Overwhelming sometimes maybe,
but not a majority. Unless he's a /lot/ fatter than he's letting on... =:-0
 
R

Richard Heathfield

Keith Thompson said:
jacob navia said:
CBFalconer wrote: [...]
To the contrary, a short time ago a thread gathered opinions on
this subject. The overwhelming majority agreed with keeping c.l.c
ISO standard based.

No. Heathfield wants C90, not ISO C.

Even if Richard Heathfield prefers C90 to C99, that has nothing to do
with whether C99 is topical.

Certainly true. Also, the thread to which Chuck is referring will show that
my topicality preference is actually considerably more liberal than that
of the average responder in that thread. Nevertheless, I abide by the
group's preference, rather than my own.
I don't recall him ever suggesting that C99 should be considered
off-topic. (If he had, I certainly would have expressed my
disagreement.)

I don't recall ever suggesting that either. Of course C99 is topical. It's
the de jure standard for C. The fact that almost no implementations
conform to it does not affect its topicality status here. Nevertheless,
until a program that uses C99 features is at least as portable as one that
uses only C90 features, I will continue to program in the common subset of
C90 and C99.
 
R

Richard Heathfield

Mark McIntyre said:
jacob navia wrote:
CBF wrote


Richard is not an overwhelming majority.

In fact, I was part of the *minority* that expressed a desire to open up
the topicality a little.
 
B

Ben Bacarisse

Nick Keighley said:
note: GMP uses the full GPL (or did last time I looked) this may
limit where you can use it.

http://gmplib.org/ says it is released under the LGPL. Unless I am
mistaken, this is the same as the licence used by the C library used
when build with gcc. I doubt this is what most people mean by "the
full GPL" but YMMV.
 
S

santosh

N

Nick Keighley

http://gmplib.org/says it is released under the LGPL. Unless I am
mistaken, this is the same as the licence used by the C library used
when build with gcc. I doubt this is what most people mean by "the
full GPL" but YMMV.

oops. No I did not mean LGPL to be included in "full GPL"
I was under the impression that GMP didn't use LGPL.
I relied on a vague memory rather than checking. :-(
 
C

CBFalconer

Nick said:
note: GMP uses the full GPL (or did last time I looked) this may
limit where you can use it.

GPL (and LGPL) do not limit your use. However they do, under
certain conditions, limit your distribution of the resultant
program.
 
U

user923005

Marco said:
Harald said:
On Fri, 30 Nov 2007 14:36:58 -0800, user923005 wrote:
No. All this extensions are compatible with the C standard as I
have explained thousand times in this newsgroup.
Note that the C standard does NOT forbid extensions
By the same logic, this is C code, since GCC compiles it:
PROGRAM STEFACC
C NUMERICAL METHODS: FORTRAN Programs, (c) John H. Mathews 1994
C
[...]
This is not accepted by any version of GCC in any mode where it aims
to conform to any version of the C standard, and I would be very
surprised if it is accepted by any other compiler in any such mode.
gcc is not the C-compiler.

The GNU documentation says that 'gcc' is still used as a name to the C
compiler within the GNU Compiler Collection (GCC). To compiler
user923005, you'd probably need g77.

True, but beside the point:

dcorbit@DCORBIT64 /c/f
$ gcc -c -W -Wall -pedantic stef.f

dcorbit@DCORBIT64 /c/f
$
 
H

Harald van Dijk

Marco said:
Harald van D?k wrote:
On Fri, 30 Nov 2007 14:36:58 -0800, user923005 wrote:
No. All this extensions are compatible with the C standard as I
have explained thousand times in this newsgroup.
Note that the C standard does NOT forbid extensions
By the same logic, this is C code, since GCC compiles it:
PROGRAM STEFACC
C NUMERICAL METHODS: FORTRAN Programs, (c) John H. Mathews 1994
C
[...]
This is not accepted by any version of GCC in any mode where it aims
to conform to any version of the C standard, and I would be very
surprised if it is accepted by any other compiler in any such mode.
gcc is not the C-compiler.

The GNU documentation says that 'gcc' is still used as a name to the C
compiler within the GNU Compiler Collection (GCC). To compiler
user923005, you'd probably need g77.

True, but beside the point:

dcorbit@DCORBIT64 /c/f
$ gcc -c -W -Wall -pedantic stef.f

You're invoking gcc as a Fortran compiler, and you obviously know you're
invoking gcc as a Fortran compiler. The documentation explains how to
invoke it in its C conforming mode.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top