It's again a port issue from VC 6 to 2005. Here is the problem code

Code Snippet

# ifndef __WATCOMC__

extern char *sys_errlist[];

extern int errno;

# endif

It is giving error code C2090: function returns array

I am not using Watcom C so I could just comment out the directive, but I still want to keep it for backward compatibility.

Re: Visual C++ General Error C2090

Ramkrishna Pawar

Well, above shown code is okay with 2005, are you sure this is the line Visual Studio shows when you double click on the error in output window

Re: Visual C++ General Error C2090


The only explanation I can come up with, off the top of my head, is that sys_errlist is corrupted by some odd definition, such as "#define sys_errlist foo()".

Re: Visual C++ General Error C2090

Bite Qiu - MSFT

Hi Asif110,

We are changing the issue type to "Comment" because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to "Question" by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Thank you!