-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support of MSVC __asm {} statement #262
Comments
sample file:
|
Hi, Some hints below: Mock compiler specific keywords with: ISO standard defines: Many compiler are supporting: VS: http://msdn.microsoft.com/en-us/library/45yd4tzz.aspx GCC: Current parser implementation: So yes, VS syntax is not supported. Would add support, but only with keyword asm. Others could be simulated with preprocessor. Regards |
An additional keyword '__asm' is not necessary and the '#define __asm asm' directive should do the job. The important part is anyway to support 'asm { assembly-instruction-list }' and 'asm assembly-instruction' syntax. |
This two cases seems to be easy to support: Interesting is this case (without semicolon at the end). How to parse for EOL? |
Solved except syntax @Bertk please test |
Works fine with this preprocessor settings:
Thank you. |
Microsoft C++ uses a proprietary __asm keyword which is not handled by cxx-squid. The analysis of the source file will fail and no workaround is known so far.
Syntax:
__asm assembly-instruction [ ; ]
__asm { assembly-instruction-list } [ ; ]
The lexer shall support this Microsoft specific statement.
See also: http://jira.sonarsource.com/browse/CPP-648
The text was updated successfully, but these errors were encountered: