public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Grant Gould <ggould@intouchsys.com>
To: gcc-gnats@gcc.gnu.org
Cc: gildea@intouchsys.com
Subject: c/3297: fixincludes (?) removes pthread types from types.h
Date: Wed, 20 Jun 2001 08:46:00 -0000	[thread overview]
Message-ID: <200106201539.f5KFdtg18503@curley.intouchsys.com> (raw)

>Number:         3297
>Category:       c
>Synopsis:       fixincludes (?) removes pthread types from types.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 20 08:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Grant Gould
>Release:        3.0
>Organization:
Comverse Network Systems (Voice Solutions)
>Environment:
System: SunOS curley.intouchsys.com 5.7 Generic_106541-15 sun4m sparc SUNW,SPARCstation-5
Architecture: sun4

	
host: sparc-sun-solaris2.5
build: sparc-sun-solaris2.5
target: sparc-sun-solaris2.5
configured with: ../gcc-3.0/configure 
>Description:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.5/3.0/include/sys/types.h
does not define pthreads-related types.  Standard solaris headers in
/usr/include (such as /usr/include/time.h) rely on it doing so.  This
results in parse errors when these headers use pthread_attr_t and it
has not been provided by the #include<sys/types.h>

>How-To-Repeat:
Here's a copy-and-paste of my demonstration.  Note that hworld2.c is
legal, but will only compile if I explicitly force the use of the
headers in /usr/include rather than letting gcc use its fixed headers.

 $ curley $ cat hworld.c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello, World!\n");
}
 $ curley $ cat hworld2.c
#include <time.h>
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello, World!\n");
}
 $ curley $ gcc hworld.c -o hworld
 $ curley $ ./hworld
Hello, World!
 $ curley $ gcc hworld2.c -o hworld2
In file included from hworld2.c:1:
/usr/include/time.h:131: parse error before "pthread_attr_t"
/usr/include/time.h:133: parse error before '}' token
 $ curley $ gcc hworld2.c -I/usr/include/ -o hworld2
 $ curley $ ./hworld2
Hello, World!

>Fix:
Well, you could leave the pthreads definitions in the fixed types.h --
I don't see why it is excised.

As it is, gcc leaves a situation where no simple #include line will
get you the pthread types.  That's no good.
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-06-20  8:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-20  8:46 Grant Gould [this message]
2001-06-20 14:46 Grant Gould
2001-06-20 17:14 aoliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200106201539.f5KFdtg18503@curley.intouchsys.com \
    --to=ggould@intouchsys.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=gildea@intouchsys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).