public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: joona.kiiski@iki.fi
To: gcc-gnats@gcc.gnu.org
Subject: c++/9310: FD_ZERO etc. macros give strange errors with templates
Date: Tue, 14 Jan 2003 16:16:00 -0000	[thread overview]
Message-ID: <20030114161356.20872.qmail@sources.redhat.com> (raw)


>Number:         9310
>Category:       c++
>Synopsis:       FD_ZERO etc. macros give strange errors with templates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 14 08:16:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     joona.kiiski@iki.fi
>Release:        g++ 2.95.4
>Organization:
>Environment:
Unix / Debian unstable
>Description:
#include <sys/select.h>
using namespace std;

template <class Type>
class myclass1
{
  public:
    void test()
    { 
      fd_set myfs;
      FD_ZERO(&myfs);
    }
};

struct dum {};

int main()
{
  myclass1<dum> temp;
  temp.test();
}
>How-To-Repeat:
Compile code above. Note this works fine with g++ 3.0 and higher, but not with 2.95.4. I got this error message:

g++    -c -o main.o main.cc
main.cc: In method `void myclass1<dum>::test()':
main.cc:20:   instantiated from here
main.cc:11: `volatile' undeclared (first use this function)
main.cc:11: (Each undeclared identifier is reported only once
main.cc:11: for each function it appears in.)
main.cc:11: warning:  qualifier ignored on asm
make: *** [main.o] Error 1
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2003-01-14 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-14 16:16 joona.kiiski [this message]
2003-01-14 16:28 bangerth

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=20030114161356.20872.qmail@sources.redhat.com \
    --to=joona.kiiski@iki.fi \
    --cc=gcc-gnats@gcc.gnu.org \
    /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).