Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2006

Tip: Looking for answers? Try searching our database.

C2485 __declspec(restrict)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fernando Cacciola - 22 Mar 2006 18:33 GMT
Hi,

I'm having a very strange problem with VC8

When compiling a library called gmp (v 4.1.4); with win32 patches applied
for VC7 (VC8 is not directly supported yet), I get this error all over
pretty much every system header:

C2485 __restrict__ is an invalid attribute.

The offending code, in places like malloc.h, stdlib.h, etc,
contains the macro _CRTRESTRICT, which is defined in crtdefs.h as
__declspec(restrict)

But that attribute _is_ valid....

Any ideas?

TIA

Fernando Cacciola
Bruno van Dooren - 22 Mar 2006 19:03 GMT
> Hi,
>
[quoted text clipped - 17 lines]
>
> Fernando Cacciola

Hi,

I noticed that in your error message, restrict is surrounded by 2
underscores on each side.
if I compile this:

__declspec(restrict) char * rfun();
it copiles just fine, but if I try this:
__declspec(__restrict__) char * rfun();

I too get
error C2485: '__restrict__' : unrecognized extended attribute

Which leads me to believe that somehow your declspecs get mangled since
__restrict__ really is invalid.

You said that VC8 was not yet explicitly supported by that toolkit.
restrict was not yet known by VC7.1.
Could it be that a macro definition is wreaking havoc?

If that is the case then you can find this out by looking at the
preprocessed output and checking
what gets changed because ot which definitions.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.