public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Luu Vo" <vtluu@tma.com.vn>
To: <gcc-help@gcc.gnu.org>
Subject: extern C and static data type problem with g++
Date: Tue, 27 Apr 2004 09:16:00 -0000	[thread overview]
Message-ID: <001d01c42c38$0582b7a0$cc62a8c0@LuuVo> (raw)

In RH Linux 9, when compiling my C++ program with lines as below:

extern "C" struct {int x};
static enum E{A=0, B, C};

g++ said:

storage class specified for field `x'
`static' can only be specified for objects and functions

Is this just the implementation of g++? That means I can't use static and
extern "C" for those lines of code?

Another question: with GNU g++/gcc compiler and its C++ library, can I use
both traditional C++ lib (e.g., classic iostream) and standard C++ lib
(e.g., standard iostream) in my C++ program. Are the both libraries
implemented in glibstdc++?

Any help will be appreciated.

Luu Vo.

             reply	other threads:[~2004-04-27  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-27  9:16 Luu Vo [this message]
2004-04-27 14:33 ` llewelly
2004-04-27  9:30 Lev Assinovsky

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='001d01c42c38$0582b7a0$cc62a8c0@LuuVo' \
    --to=vtluu@tma.com.vn \
    --cc=gcc-help@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).