You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "patacongo (via GitHub)" <gi...@apache.org> on 2023/05/01 15:57:24 UTC
[GitHub] [nuttx] patacongo commented on pull request #8478: compiler/diagnostic: Replace all #warning to #pragma message
patacongo commented on PR #8478:
URL: https://github.com/apache/nuttx/pull/8478#issuecomment-1529866731
> Since #warning is also a compiler specific, I suggest that:
>
> 1. Add a macro in compiler.h to wrap #warning, so we can replace it with a dummy body for Microsoft compiler
>
> 2. Remove #warning from common code base(e.g. sched/, fs/, mm/, net/) since Microsoft compiler can only compile sim target
I thought about suggesting something like that, but was hesitant to do so. I have had problems in the past with pre-processor macros that expand to other pre-processor macros. I suspect that this is not handled properly by some pre-processors. It assumes that in evaluating a macro, the pre-processors expands and re-evaluates the macro recursively until everything is expanded and all substitutions are made THEN re-values the fully expanded macro one final time to get the final behavior.
So the result of can be difficult to control and is probably not portable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org