public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/53178] New: fixinclude needed for iso/ctype_iso.h on Solaris 8
@ 2012-05-01 19:59 skunk at iskunk dot org
  2012-05-02  9:29 ` [Bug other/53178] " steven at gcc dot gnu.org
  2012-05-02 15:58 ` skunk at iskunk dot org
  0 siblings, 2 replies; 3+ messages in thread
From: skunk at iskunk dot org @ 2012-05-01 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53178
           Summary: fixinclude needed for iso/ctype_iso.h on Solaris 8
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: skunk@iskunk.org
              Host: i386-pc-solaris2.8
            Target: i386-pc-solaris2.8
             Build: i386-pc-solaris2.8


Created attachment 27273
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27273
/usr/include/iso/ctype_iso.h from Solaris 8

$ cat ctype.c
#include <ctype.h>

int main(void)
{
        char c = 'A';

        return isgraph(c);
}

$ gcc -W -Wall -c ctype.c
ctype.c: In function 'main':
ctype.c:7:2: warning: array subscript has type 'char' [-Wchar-subscripts]

This is bad if you're building with -Werror.

The problem:

$ grep isgraph /usr/include/iso/ctype_iso.h
extern int isgraph(int);
inline int isgraph(int c) { return (__ctype_mask[c] & _ISGRAPH); }
inline int isgraph(int c) { return ((__ctype + 1)[c] & (_P | _U | _L | _N)); }
#define    isgraph(c)    (__ctype_mask[c] & _ISGRAPH)
#define    isgraph(c)    ((__ctype + 1)[c] & (_P | _U | _L | _N))
#define    isgraph(c)    ((_ctype + 1)[c] & (_P | _U | _L | _N))

The solution:

$ grep isgraph
/opt/gcc/lib/gcc/i386-pc-solaris2.8/4.7.0/include-fixed/iso/ctype_iso.h
extern int isgraph(int);
inline int isgraph(int c) { return (__ctype_mask[c] & _ISGRAPH); }
inline int isgraph(int c) { return ((__ctype + 1)[c] & (_P | _U | _L | _N)); }
#define    isgraph(c)    (__ctype_mask[(int)(c)] & _ISGRAPH)
#define    isgraph(c)    ((__ctype + 1)[(int)(c)] & (_P | _U | _L | _N))
#define    isgraph(c)    ((_ctype + 1)[(int)(c)] & (_P | _U | _L | _N))

Same deal with the other isxxxxx() routines. I'm attaching the unmodified
system header file for reference.


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

* [Bug other/53178] fixinclude needed for iso/ctype_iso.h on Solaris 8
  2012-05-01 19:59 [Bug other/53178] New: fixinclude needed for iso/ctype_iso.h on Solaris 8 skunk at iskunk dot org
@ 2012-05-02  9:29 ` steven at gcc dot gnu.org
  2012-05-02 15:58 ` skunk at iskunk dot org
  1 sibling, 0 replies; 3+ messages in thread
From: steven at gcc dot gnu.org @ 2012-05-02  9:29 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-05-02
                 CC|                            |steven at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-02 09:29:33 UTC ---
Solaris 8 is obsolete. Support for it will be removed in the next GCC release,
see http://gcc.gnu.org/gcc-4.7/changes.html.

Is this problem also present in more recent Solaris releases?


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

* [Bug other/53178] fixinclude needed for iso/ctype_iso.h on Solaris 8
  2012-05-01 19:59 [Bug other/53178] New: fixinclude needed for iso/ctype_iso.h on Solaris 8 skunk at iskunk dot org
  2012-05-02  9:29 ` [Bug other/53178] " steven at gcc dot gnu.org
@ 2012-05-02 15:58 ` skunk at iskunk dot org
  1 sibling, 0 replies; 3+ messages in thread
From: skunk at iskunk dot org @ 2012-05-02 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Daniel Richard G. <skunk at iskunk dot org> 2012-05-02 15:57:24 UTC ---
(In reply to comment #1)
> Is this problem also present in more recent Solaris releases?

It's gone as of Solaris 10 (the macros have the necessary casts), but I don't
have a 9 system to check.

Can a fixinclude go in, just so that 4.7 can have reasonably complete -Werror
support for Solaris 8? No previous version of GCC is going to have that.


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

end of thread, other threads:[~2012-05-02 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-01 19:59 [Bug other/53178] New: fixinclude needed for iso/ctype_iso.h on Solaris 8 skunk at iskunk dot org
2012-05-02  9:29 ` [Bug other/53178] " steven at gcc dot gnu.org
2012-05-02 15:58 ` skunk at iskunk dot 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).