Skip to content
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

Invalid ## usage when expanding #300

Open
hobala opened this issue Aug 7, 2023 · 1 comment
Open

Invalid ## usage when expanding #300

hobala opened this issue Aug 7, 2023 · 1 comment

Comments

@hobala
Copy link

hobala commented Aug 7, 2023

cppcheck 2.11 throws this error with the following code (Atmel ASF):

[FILE_LOCATION/ASF/common/utils/parts.h:63] (error) failed to expand 'SAM', Invalid ## usage when expanding 'SAM_PART_IS_DEFINED': Unexpected token ')' [preprocessorErrorDirective]

I think this is an error of simplecpp!

/* ! Check GCC and IAR part definition for 8-bit AVR */
#define AVR8_PART_IS_DEFINED(part) \
(defined(__ ## part ## __) || defined(_AVR ## part ## __))

/* ! Check GCC and IAR part definition for 32-bit AVR */
#define AVR32_PART_IS_DEFINED(part) \
(defined(__AT32 ## part ## __) || defined(_AVR32 ## part ## __))

/* ! Check GCC and IAR part definition for SAM /
#define SAM_PART_IS_DEFINED(part) (defined(__ ## part ## __))
// ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/
* @} */

This was referenced Aug 7, 2023
@LorandMarton
Copy link

I also encounter the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants