public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: <neal@ctd.comsat.com>
To: egcs@cygnus.com
Subject: Strange (worrysome?) g++ problem
Date: Sat, 01 Nov 1997 08:46:00 -0000	[thread overview]
Message-ID: <E0xRgg7-00003E-00@neal.fred.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

Here is an very small test case that produces a very strange result.

This is egcs-971031 linux-i586 glibc-2.0.5.

Here is Test.cc:
--------------------
#include <sys/types.h> // for pid_t
#include <sys/wait.h>
#include <signal.h>

class KProcess {
private:
  pid_t pid;
  int status;         // the process' exit status as returned by "waitpid"
  bool runs;          // the process is currently executing
public:
  bool normalExit();
};


bool KProcess::normalExit()
{
  return (pid != 0) && (!runs) && (WIFEXITED(status));
}
-------------------

Here's what happens:

g++ -c Test.cc
Test.cc: In method `bool KProcess::normalExit()':
Test.cc:17: member `status' is a private member of class `KProcess'
--------------------------

Now you will probably want to see Test.ii because the expansion of
WIFEXITED is rather odd


[-- Attachment #2: Test.ii.gz --]
[-- Type: application/x-gzip, Size: 2768 bytes --]

                 reply	other threads:[~1997-11-01  8:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E0xRgg7-00003E-00@neal.fred.net \
    --to=neal@ctd.comsat.com \
    --cc=egcs@cygnus.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).