Problem with templates and warning C4503 - by Seweryn Habdank-Wojewodzki

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


2
0
Sign in
to vote
ID 510561 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 11/14/2009 7:41:16 AM
Access Restriction Public

Description

Dears,

When the VC 9.0 compiler meet too long identifier generates warning:

"
warning C4503: decorated name length exceeded, name was truncated
"

If the class was a template class then there are NO added other parameters of the template, what makes impossible
to fix the case of the warning, because the warning appears in the body of the template. 
The warning C4503 message (as other warnings) shall include all data related to the process of the instantiation of the template.

Best regards,
Dr. Seweryn Habdank-Wojewodzki.
Sign in to post a comment.
Posted by Seweryn Habdank-Wojewodzki on 11/19/2009 at 11:00 PM
Hi,

Thanks a lot for the explanation. I have just one question. The length 100K is in side VC 9.0 SP1 or newer?

Have a nice day,
Dr. Seweryn Habdank-Wojewodzki.
Posted by Microsoft on 11/17/2009 at 10:14 AM
Hi: unfortunately the warning for name truncation, C4503, is emitted when the parser is emiting the intermediate IL code and at that point the parser no longer has the context that enables it to emit the "specialization stack" (internally the parser can handle much longer names - the hard limit is currently somewhere over 100K characters).

Jonathan Caves
Visual C++ Compiler Team
Posted by Microsoft on 11/16/2009 at 1:11 AM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Could you please attach a zipped project file to help us reproduce the issue?

Thanks again for your efforts and we look forward to hearing from you.
Visual Studio Product Team