aws / aws-ofi-nccl

This is a plugin which lets EC2 developers use libfabric as network provider while running NCCL applications.
Apache License 2.0
147 stars 56 forks source link

fix(tree): add fallthrough switch markers #585

Closed aws-nslick closed 1 month ago

aws-nslick commented 2 months ago

Stacked PRs:


fix(tree): add fallthrough switch markers

Signed-off-by: Nicholas Sielicki nslick@amazon.com

aws-nslick commented 1 month ago

On the top PR, this was amended to use the following macro instead:

#if __has_attribute(__fallthrough__)
# define fallthrough                    __attribute__((__fallthrough__))
#else
# define fallthrough                    do {} while (0)  /* fallthrough */
#endif

Only GCC accepts the comments, clang requires the attribute. GCC also has the attribute. Prefer the attribute if possible, otherwise, use the comment.