Skip to content

Commit

Permalink
Cgo: Add -Wno-unknown-warning-option to avoid warnings for Clang < 15 (
Browse files Browse the repository at this point in the history
…#84)

In passing, add an explanatory note on why the warnings are being
ignored, and that we can remove this once upgrading the parser to PG 16.
  • Loading branch information
lfittl committed May 25, 2023
1 parent e4da849 commit ced0b6f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion parser/parser.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
package parser

/*
#cgo CFLAGS: -Iinclude -g -fstack-protector -std=gnu99 -Wno-deprecated-non-prototype
* Note on CFLAGS below:
*
* -Wno-deprecated-non-prototype avoids warnings on Clang 15.0+, this can be removed in Postgres 16:
* https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1c27d16e6e5c1f463bbe1e9ece88dda811235165
*/

/*
#cgo CFLAGS: -Iinclude -g -fstack-protector -std=gnu99 -Wno-deprecated-non-prototype -Wno-unknown-warning-option
#cgo LDFLAGS:
#include "pg_query.h"
#include "xxhash.h"
Expand Down

0 comments on commit ced0b6f

Please sign in to comment.