public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/45864] New: system.h is crufty maybe? Raise the level fo ANSI C89?
@ 2010-10-02 10:20 jay.krell at cornell dot edu
  2010-10-02 12:10 ` [Bug other/45864] " joseph at codesourcery dot com
  2021-08-24  7:30 ` [Bug middle-end/45864] " pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jay.krell at cornell dot edu @ 2010-10-02 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: system.h is crufty maybe? Raise the level fo ANSI C89?
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jay.krell@cornell.edu


I recently found a compiler that didn't like spaces
after the # in preprocessor directives.


In system.h:
 Do any systems lack stddef.h? (it is in ANSI C89)
 Do any systems lack #define NULL? (ditto)
 Do any systems lack limits.h? (ditto)
 Ditto:
   string.h? time.h? (ditto)
   errno declared in errno.h? (ditto)
   SEEK_SET, SEEK_CUR, SEEK_END (ditto)
   F_OK, X_OK, W_OK, R_OK
   O_RDONLY, O_WRONLY
   atof, atol, free, getenv, strstr, abort, offsetof? (ditto)
   malloc, calloc, realloc? (ditto)
   Posixy systems that gcc can be hosted on: getcwd, getwd, sbrk?


I wonder if all the compability stuff needs to stay.
  Along with suggesting a new one -- no spaces after #.


I wonder if the _unlocked stuff is worthwhile.
  One should be sure to have reasonably large inputs/outputs, not
  just getchar one at a time, for example.


Maybe some of this is for "header-less" environments?
I grant, getting headers for cross build scenarios can be a pain.
But I do need the libraries anyway.


 - Jay


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

* [Bug other/45864] system.h is crufty maybe? Raise the level fo ANSI C89?
  2010-10-02 10:20 [Bug other/45864] New: system.h is crufty maybe? Raise the level fo ANSI C89? jay.krell at cornell dot edu
@ 2010-10-02 12:10 ` joseph at codesourcery dot com
  2021-08-24  7:30 ` [Bug middle-end/45864] " pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: joseph at codesourcery dot com @ 2010-10-02 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-10-02 12:10:46 UTC ---
On Sat, 2 Oct 2010, jay.krell at cornell dot edu wrote:

> I recently found a compiler that didn't like spaces
> after the # in preprocessor directives.

The requirement for several years has been that you have a C90 compiler, 
which means that your compiler is not supported, but not necessarily a C90 
library.

The principle of requiring a C++98 compiler has been agreed and it is 
likely in practice to go along with requiring more substantial C90 support 
in the library (e.g. prototypes for standard functions), so a few of these 
bits might be able to go away when the C++ requirements goes in.  
Bugzilla is not a useful place to discuss possible changes to 
requirements; do that on the gcc list.  If you believe certain configure 
checks are no longer needed *in the context of the existing host 
requirements* you should send patches to remove them (minimal patches 
removing just a specific check).

>    Posixy systems that gcc can be hosted on: getcwd, getwd, sbrk?

sbrk appears to be used only conditionally in mips-tfile.c (which is only 
used on alpha-dec-osf, so the question is what declarations that system 
has - all these conditionals are about the possibility of a system having 
a function but not a header prototype for it).  Portable code shouldn't be 
using sbrk at all; it would be better just to keep the malloc case of the 
code.


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

* [Bug middle-end/45864] system.h is crufty maybe? Raise the level fo ANSI C89?
  2010-10-02 10:20 [Bug other/45864] New: system.h is crufty maybe? Raise the level fo ANSI C89? jay.krell at cornell dot edu
  2010-10-02 12:10 ` [Bug other/45864] " joseph at codesourcery dot com
@ 2021-08-24  7:30 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-24  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-08-24
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |internal-improvement
           Severity|normal                      |enhancement
          Component|other                       |middle-end
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, This should be cleaned up but I highly doubt it is high on anyone's
list of things to do. Right now GCC requires a C++11 compiler even so there a
lot of improvments over what is currently mentioned too.

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

end of thread, other threads:[~2021-08-24  7:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-02 10:20 [Bug other/45864] New: system.h is crufty maybe? Raise the level fo ANSI C89? jay.krell at cornell dot edu
2010-10-02 12:10 ` [Bug other/45864] " joseph at codesourcery dot com
2021-08-24  7:30 ` [Bug middle-end/45864] " pinskia at gcc dot gnu.org

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