Unix Technical Forum

aCC compiler failing due to static storage class

This is a discussion on aCC compiler failing due to static storage class within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hi, I am trying to compile some source code in aCC 3.39 and in various places I am getting ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 06:47 PM
Sn0tters@yahoo.co.uk
 
Posts: n/a
Default aCC compiler failing due to static storage class

Hi,

I am trying to compile some source code in aCC 3.39 and in various
places I am getting

Error 566: "tmcxaps.cxx", line 1812 # Static class member "const int
ApsConstants::OLD_PORT" m
ay not have this storage class.
04:52:50.142 [250] static const int ApsConstants::OLD_PORT(FALSE);

I did not get this with version 3.25.
Can anyone identify the problem?

Thanks
Wil

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 06:47 PM
Paul Pluzhnikov
 
Posts: n/a
Default Re: aCC compiler failing due to static storage class

Sn0tters@yahoo.co.uk writes:

> I am trying to compile some source code in aCC 3.39 and in various
> places I am getting
>
> Error 566: "tmcxaps.cxx", line 1812 # Static class member "const int
> ApsConstants::OLD_PORT" may not have this storage class.
> 04:52:50.142 [250] static const int ApsConstants::OLD_PORT(FALSE);


You are not asking a smart question. Try reading this:
http://catb.org/%7Eesr/faqs/smart-questions.html
and ask again.

> Can anyone identify the problem?


I can *guess* that the minimal test case is:

struct ApsConstants {
static const int OLD_PORT;
};

static const int ApsConstants::OLD_PORT = 0;

If that's the case, your code is bogus. Drop the second 'static'
from it, and it will compile fine.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 06:48 PM
Sn0tters@yahoo.co.uk
 
Posts: n/a
Default Re: aCC compiler failing due to static storage class

Well, I was trying not to give a flood of irrelevant information but
you are correct in retrospect it was a bit minimalist!

Anyway your minimal test cae was pretty much correct and the removal of
static has solved the problem.


Thanks!

Wil

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:56 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com