public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47672] New: math-68881.h does not support C99
@ 2011-02-09 23:24 vincent.riviere at freesbee dot fr
  2011-02-09 23:43 ` [Bug c/47672] " vincent.riviere at freesbee dot fr
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vincent.riviere at freesbee dot fr @ 2011-02-09 23:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

           Summary: math-68881.h does not support C99
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincent.riviere@freesbee.fr
            Target: m68k-*


The file gcc/config/m68k/math-68881.h is distributed with GCC, however it does
not support C99. When this file is included in multiple files, then compiled
with --std=c99 or --std=gnu99 this leads to duplicate definitions.
This is because it uses "extern inline" unconditionally.


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

* [Bug c/47672] math-68881.h does not support C99
  2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
@ 2011-02-09 23:43 ` vincent.riviere at freesbee dot fr
  2011-05-02 17:47 ` [Bug target/47672] " schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vincent.riviere at freesbee dot fr @ 2011-02-09 23:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

--- Comment #1 from Vincent Riviere <vincent.riviere at freesbee dot fr> 2011-02-09 23:27:51 UTC ---
Created attachment 23291
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23291
Fix for math-68881.h and C99

This patch fixes the problem.


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

* [Bug target/47672] math-68881.h does not support C99
  2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
  2011-02-09 23:43 ` [Bug c/47672] " vincent.riviere at freesbee dot fr
@ 2011-05-02 17:47 ` schwab@linux-m68k.org
  2011-06-06  9:03 ` alanh at fairlite dot co.uk
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2011-05-02 17:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> 2011-05-02 17:20:40 UTC ---
I'd rather remove that file.


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

* [Bug target/47672] math-68881.h does not support C99
  2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
  2011-02-09 23:43 ` [Bug c/47672] " vincent.riviere at freesbee dot fr
  2011-05-02 17:47 ` [Bug target/47672] " schwab@linux-m68k.org
@ 2011-06-06  9:03 ` alanh at fairlite dot co.uk
  2011-06-06 19:06 ` vincent.riviere at freesbee dot fr
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: alanh at fairlite dot co.uk @ 2011-06-06  9:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

Alan Hourihane <alanh at fairlite dot co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alanh at fairlite dot co.uk

--- Comment #3 from Alan Hourihane <alanh at fairlite dot co.uk> 2011-06-06 09:02:59 UTC ---
Should math-68881.h be part of a OS's libc/libm then ?


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

* [Bug target/47672] math-68881.h does not support C99
  2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
                   ` (2 preceding siblings ...)
  2011-06-06  9:03 ` alanh at fairlite dot co.uk
@ 2011-06-06 19:06 ` vincent.riviere at freesbee dot fr
  2011-06-06 19:55 ` mikpe at it dot uu.se
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vincent.riviere at freesbee dot fr @ 2011-06-06 19:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

--- Comment #4 from Vincent Riviere <vincent.riviere at freesbee dot fr> 2011-06-06 19:06:07 UTC ---
Normal math implementation should always reside inside libm, to fully support 
exceptions, error handling, etc.

When better speed is required, and strict standard compliance is not required,
a user can compile his program with -ffast-math. As a result, any call to sin()
will be implemented by a single fsin instruction rather than a call to libm.
The purpose is the same as math-68881.h. But the implementation is different:
math-68881.h relies on the preprocessor, while -ffast-math is directly handled
by GCC at low level for better register usage, etc. This is why ideally
math-68881.h should be removed from GCC and -ffast-math always used by the
users, when needed. However, someone reported that all the functionnality of
math-68881.h was not reported to -ffast-math: some instructions are missing.

So I propose the following roadmap:

1) Commit my proposed patch, then close this bug. This will fix the current
math-68881.h for C99. I hit that problem when compiling libtiff.

2) Move the missing functionnality from math-68881.h to -ffast-math, then
remove math-68881.h from GCC.


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

* [Bug target/47672] math-68881.h does not support C99
  2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
                   ` (3 preceding siblings ...)
  2011-06-06 19:06 ` vincent.riviere at freesbee dot fr
@ 2011-06-06 19:55 ` mikpe at it dot uu.se
  2011-06-06 21:21 ` vincent.riviere at freesbee dot fr
  2015-01-17  7:57 ` law at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: mikpe at it dot uu.se @ 2011-06-06 19:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

--- Comment #5 from Mikael Pettersson <mikpe at it dot uu.se> 2011-06-06 19:54:58 UTC ---
(In reply to comment #4)
> However, someone reported that all the functionnality of
> math-68881.h was not reported to -ffast-math: some instructions are missing.
...
> 2) Move the missing functionnality from math-68881.h to -ffast-math, then
> remove math-68881.h from GCC.

I only see this PR and PR49295 mention math-68881.h, and neither PR lists any
missing instructions.

What specific instructions are missing from -ffast-math?


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

* [Bug target/47672] math-68881.h does not support C99
  2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
                   ` (4 preceding siblings ...)
  2011-06-06 19:55 ` mikpe at it dot uu.se
@ 2011-06-06 21:21 ` vincent.riviere at freesbee dot fr
  2015-01-17  7:57 ` law at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: vincent.riviere at freesbee dot fr @ 2011-06-06 21:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

--- Comment #6 from Vincent Riviere <vincent.riviere at freesbee dot fr> 2011-06-06 21:20:46 UTC ---
> What specific instructions are missing from -ffast-math?

I don't know myself, but I have been told it was the case.
http://gcc.gnu.org/ml/gcc/2011-02/msg00186.html


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

* [Bug target/47672] math-68881.h does not support C99
  2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
                   ` (5 preceding siblings ...)
  2011-06-06 21:21 ` vincent.riviere at freesbee dot fr
@ 2015-01-17  7:57 ` law at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: law at redhat dot com @ 2015-01-17  7:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47672

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |law at redhat dot com
         Resolution|---                         |WONTFIX

--- Comment #7 from Jeffrey A. Law <law at redhat dot com> ---
math-m68881.h is obsolete and should not be used.  There are no plans to
fix/upgrade the contents of that file.


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

end of thread, other threads:[~2015-01-17  7:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 23:24 [Bug c/47672] New: math-68881.h does not support C99 vincent.riviere at freesbee dot fr
2011-02-09 23:43 ` [Bug c/47672] " vincent.riviere at freesbee dot fr
2011-05-02 17:47 ` [Bug target/47672] " schwab@linux-m68k.org
2011-06-06  9:03 ` alanh at fairlite dot co.uk
2011-06-06 19:06 ` vincent.riviere at freesbee dot fr
2011-06-06 19:55 ` mikpe at it dot uu.se
2011-06-06 21:21 ` vincent.riviere at freesbee dot fr
2015-01-17  7:57 ` law at redhat dot com

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).