Skip to content

Commit

Permalink
Merge pull request #150 from edmonds/cplusplus-invalid-diagnostics
Browse files Browse the repository at this point in the history
hydrogen.h: Add `#ifndef __cplusplus` guard for pragma not valid in C++
  • Loading branch information
jedisct1 authored Mar 4, 2024
2 parents 5c30662 + 6000062 commit f8a43eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hydrogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
#include <stdlib.h>
#endif

#ifndef __cplusplus
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
#endif
#endif

#ifdef __cplusplus
#ifdef __GNUC__
Expand Down

0 comments on commit f8a43eb

Please sign in to comment.