• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: const assignment issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: const assignment issue


  • Subject: Re: const assignment issue
  • From: Luigi Castelli <email@hidden>
  • Date: Fri, 8 Dec 2006 10:58:53 -0800 (PST)

>
> Using XCode 2.4.1 I find that error when the code is
> in a .c file,
> but no error when it is in a .cp file.
>

Exactly, I get the same thing.
If I make the file into a .cp then X-code reports no
error.
That's weird, isn' it? Or am I missing something
obvious?

Are C and C++ behaving differently in regards to
consts ?

Is there any way that it could be told X-code not to
complain even if the declaration is made in a .c file
?

Any help or suggestion highly appreciated.

- Luigi







--- David A Rowland <email@hidden> wrote:

> At 8:12 PM -0800 12/7/06, Luigi Castelli wrote:
> >here is the code fragment...
> >
> >extern const long kTableSize = 8192;
> >extern const long kTableMask = kTableSize - 1;
> >
> >The error that I get from X-code is:
> >error: initializer element is not constant
> >
> >- Luigi
> >




------------------------------------------------------------
THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION.  ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED.  IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT email@hidden AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.
------------------------------------------------------------




____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: const assignment issue
      • From: Klaus Backert <email@hidden>
    • Re: const assignment issue
      • From: Steve Sisak <email@hidden>
    • Re: const assignment issue
      • From: Chris Hanson <email@hidden>
    • Re: Re: const assignment issue
      • From: "Mark Wagner" <email@hidden>
References: 
 >Re: const assignment issue (From: David A Rowland <email@hidden>)

  • Prev by Date: popup of included files sometimes not working
  • Next by Date: Overriding libSystem's math functions
  • Previous by thread: Re: const assignment issue
  • Next by thread: Re: Re: const assignment issue
  • Index(es):
    • Date
    • Thread