public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Error on Member Initialization
       [not found] <1062804110.11035.ezmlm@gcc.gnu.org>
@ 2003-09-13  0:23 ` Allen Williams
  2003-09-13 14:28   ` Eljay Love-Jensen
  2003-09-14  0:39 ` WELCOME to gcc-help@gcc.gnu.org Allen Williams
  1 sibling, 1 reply; 10+ messages in thread
From: Allen Williams @ 2003-09-13  0:23 UTC (permalink / raw)
  To: gcc-help

Hello,

I have the following declared:

class RADCOMMGT_API CradComMgt
    {
public:
    CradComMgt(CLog* Log=NULL);
    ~CradComMgt();

	--- snip ---
	};
/***************************************/

In another file I declare this:

extern CLog Log;                   // <- Note declaration of CLog object

class radApp : public lnDaemon
    {
  public:
    virtual void DaemonInit();

  protected:
    CradComMgt m_MyServer(&Log);	// <- Note initialization
    };
/******************************************/

I get this from the compiler:

g++ -o radApp -D_LINUX -L../Libraries -I../Headers
radApp.cpp -lApp -lLog -lSock -lNetDataSvc -lradComMgt -lradCore
In file included from radApp.cpp:16:
radApp.h:24: error: invalid data member initialization
radApp.h:24: error: (use `=' to initialize static data members)
make: *** [radApp] Error 1

Compilation exited abnormally with code 2 at Fri Sep 12 20:04:53

I have Stroustrup's C++ reference manual and Ellis and Stroustrup's C++
Annotated reference, both of which say this should be a valid form to call
the CradComMgt::CradComMgt(CLog *) constructor.  What am I doing wrong here?

Thanks in Advance,
anw

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

* Re: Error on Member Initialization
  2003-09-13  0:23 ` Error on Member Initialization Allen Williams
@ 2003-09-13 14:28   ` Eljay Love-Jensen
  0 siblings, 0 replies; 10+ messages in thread
From: Eljay Love-Jensen @ 2003-09-13 14:28 UTC (permalink / raw)
  To: Allen Williams, gcc-help

Hi Allen,

That's not how you initialize a member variable in C++.  (Although it's very close to how you do it in Java.)

You need to put the initialization in your radApp's constructor's initialization list.

e.g.:
radApp::radApp()
: m_MyServer(&Log)
{ }

HTH,
--Eljay


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

* RE: WELCOME to gcc-help@gcc.gnu.org
       [not found] <1062804110.11035.ezmlm@gcc.gnu.org>
  2003-09-13  0:23 ` Error on Member Initialization Allen Williams
@ 2003-09-14  0:39 ` Allen Williams
  2003-09-14  0:45   ` static_cast, dynamic_cast, etc Allen Williams
  2003-09-14 13:55   ` WELCOME to gcc-help@gcc.gnu.org Alexandre Oliva
  1 sibling, 2 replies; 10+ messages in thread
From: Allen Williams @ 2003-09-14  0:39 UTC (permalink / raw)
  To: gcc-help

I can't find the (relatively new) static_cast, dynamic_cast, etc. in the GCC
manual.
Can anyone point me to documentation on how to use these?

TIA,
allen

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

* static_cast, dynamic_cast, etc.
  2003-09-14  0:39 ` WELCOME to gcc-help@gcc.gnu.org Allen Williams
@ 2003-09-14  0:45   ` Allen Williams
  2003-09-14 14:58     ` Eljay Love-Jensen
  2003-09-14 13:55   ` WELCOME to gcc-help@gcc.gnu.org Alexandre Oliva
  1 sibling, 1 reply; 10+ messages in thread
From: Allen Williams @ 2003-09-14  0:45 UTC (permalink / raw)
  To: Allen Williams, gcc-help

Oops!  Sorry about the original subject line.

> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
> Behalf Of Allen Williams
> Sent: Saturday, September 13, 2003 8:40 PM
> To: gcc-help@gcc.gnu.org
> Subject: RE: WELCOME to gcc-help@gcc.gnu.org
> 
> 
> I can't find the (relatively new) static_cast, dynamic_cast, etc. 
> in the GCC
> manual.
> Can anyone point me to documentation on how to use these?
> 
> TIA,
> allen

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

* Re: WELCOME to gcc-help@gcc.gnu.org
  2003-09-14  0:39 ` WELCOME to gcc-help@gcc.gnu.org Allen Williams
  2003-09-14  0:45   ` static_cast, dynamic_cast, etc Allen Williams
@ 2003-09-14 13:55   ` Alexandre Oliva
  1 sibling, 0 replies; 10+ messages in thread
From: Alexandre Oliva @ 2003-09-14 13:55 UTC (permalink / raw)
  To: Allen Williams; +Cc: gcc-help

On Sep 13, 2003, "Allen Williams" <anw@csunv.com> wrote:

> I can't find the (relatively new) static_cast, dynamic_cast, etc. in the GCC
> manual.

The GCC manual does not document the languages it compiles.  That's
something left for language standardization committees.  Only GCC
extensions or limitations are documented.  Since the Standard C++
new-style casts aren't either, they're not documented in the manual.

> Can anyone point me to documentation on how to use these?

You can get a copy of the ISO C++ Standard directly from the standards
bodies.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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

* Re: static_cast, dynamic_cast, etc.
  2003-09-14  0:45   ` static_cast, dynamic_cast, etc Allen Williams
@ 2003-09-14 14:58     ` Eljay Love-Jensen
  0 siblings, 0 replies; 10+ messages in thread
From: Eljay Love-Jensen @ 2003-09-14 14:58 UTC (permalink / raw)
  To: Allen Williams, gcc-help

Hi Allen,

Although not quite as "sacred" as the ISO 14882 standard itself, Stroustrup's "C++ Programming Language" (3rd edition or special edition) is an excellent resource that explains the how's and what's of C++.  A book of knowledge.

And Cline, Lomow, Girou's "C++ FAQs" (2nd edition) is an excellent resource that explains the when's and the why's.  A book of wisdom.

HTH,
--Eljay


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

* RE: WELCOME to gcc-help@gcc.gnu.org
       [not found] <1184073227.29349.ezmlm@gcc.gnu.org>
@ 2007-07-10 13:19 ` Arora Yogesh-a22623
  0 siblings, 0 replies; 10+ messages in thread
From: Arora Yogesh-a22623 @ 2007-07-10 13:19 UTC (permalink / raw)
  To: gcc-help

Hi every one 

I am facing a problem related to debug 
I have a large set of code, which I build using makefile
When I debug the code (built with -g option ) , the symbols are linked
to wrong files. For example if a symbol ABC::ABC() is in ABC.cpp , At
the time of debugging it show ABC::ABC() in XYZ.cpp.

Due to this I am not able to debug properly

Can any one give me some pointers what could be the reason for this , 


Thanks
Yogesh
 
"In order to understand recursion....you must first understand
recursion."

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

* Re: WELCOME to gcc-help@gcc.gnu.org
  2006-01-27 10:08 Vincent Barat
@ 2006-01-27 13:43 ` Alexandre Oliva
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Oliva @ 2006-01-27 13:43 UTC (permalink / raw)
  To: Vincent Barat; +Cc: gcc-help

On Jan 27, 2006, "Vincent Barat" <vbarat@nexwave-solutions.com> wrote:

> I'm working on a project for which a MN103 compiler is needed. We
> currently use Matsushita's standard compiler, which in turn is gcc 3.2.2
> patched and corrected by RedHat. This one works well, but the
> corrections seem to have never been released to the open source
> community.
 
I very much doubt it, but if you have any suggestion as to which fixes
failed to make it, please let me know and I'll be happy to have a
look.  It's more likely that, if you're playing with newer toolchains
targeted at mn10300-elf or am33_2.0-linux-gnu and they don't quite
work, they're just suffering from bit rot.  I know I've neglected
their maintenance for quite a while, but I'm afraid I didn't have much
of a choice.

> Also, I think RedHat should have contributed back to the open source
> community by giving their corrections and patches to the FSF. Am I right
> ?
 
Yes, and we did that, to the best of my knowledge.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

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

* RE: WELCOME to gcc-help@gcc.gnu.org
@ 2006-01-27 10:08 Vincent Barat
  2006-01-27 13:43 ` Alexandre Oliva
  0 siblings, 1 reply; 10+ messages in thread
From: Vincent Barat @ 2006-01-27 10:08 UTC (permalink / raw)
  To: gcc-help

Hello,
 
I'm working on a project for which a MN103 compiler is needed. We
currently use Matsushita's standard compiler, which in turn is gcc 3.2.2
patched and corrected by RedHat. This one works well, but the
corrections seem to have never been released to the open source
community.
 
So, in order to get rid of this compiler (which is furthermore very
expensive) I am looking for a free GCC compiler for MN103 (i.e. one
directly provided by GNU) and I have tested GCC 3.3.2 and GCC 3.4.5 for
MN103 (cross compiler).
 
Unfortunately, those compilers seem not to work correctly when used with
optimization enabled (-O2). I cannot give a lot of information on this
bug, except that our test suites crash when -O2 optimizations are
activated (but not with Matsushita's GCC compiler). The bug is not so
frequent and seem to happen especially when a lot of context switches
occur (in multithreaded stress tests).
 
So, my question is : do you have any information about a potential bug
related to optimization in GCC's MN103 port ? Can you give me some
advice ?
 
Also, I think RedHat should have contributed back to the open source
community by giving their corrections and patches to the FSF. Am I right
?
 
Best regards,

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

* Re: WELCOME to gcc-help@gcc.gnu.org
       [not found] <1095661597.26784.ezmlm@gcc.gnu.org>
@ 2004-09-20  7:37 ` zhiguo ge
  0 siblings, 0 replies; 10+ messages in thread
From: zhiguo ge @ 2004-09-20  7:37 UTC (permalink / raw)
  To: gcc-help

I want to do basic block and procedure reordering to impove the code
performance.

But It seems quite difficult to implement it.

 Is there any tools for converting binary code to control flow graph
or intermediate code by which I can reorder the blocks and
reconverting them to binary code?

Or can I manipulate the instructions in gcc directly? The gcc seems
quite complicated.

Best regards,

zhiguo

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

end of thread, other threads:[~2007-07-10 13:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1062804110.11035.ezmlm@gcc.gnu.org>
2003-09-13  0:23 ` Error on Member Initialization Allen Williams
2003-09-13 14:28   ` Eljay Love-Jensen
2003-09-14  0:39 ` WELCOME to gcc-help@gcc.gnu.org Allen Williams
2003-09-14  0:45   ` static_cast, dynamic_cast, etc Allen Williams
2003-09-14 14:58     ` Eljay Love-Jensen
2003-09-14 13:55   ` WELCOME to gcc-help@gcc.gnu.org Alexandre Oliva
     [not found] <1095661597.26784.ezmlm@gcc.gnu.org>
2004-09-20  7:37 ` zhiguo ge
2006-01-27 10:08 Vincent Barat
2006-01-27 13:43 ` Alexandre Oliva
     [not found] <1184073227.29349.ezmlm@gcc.gnu.org>
2007-07-10 13:19 ` Arora Yogesh-a22623

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).