sqlitestudio icon indicating copy to clipboard operation
sqlitestudio copied to clipboard

Warnings "__VA_ARGS__ is a GNU extension" in clang-3.7 compiler

Open pawelsalawa opened this issue 7 years ago • 6 comments

(This issue was migrated from the old bug tracker of SQLiteStudio)

Original ID from old bug tracker: 3100 Originally created at: Thu Jun 16 21:35:41 2016 Originally last updated at: Thu Jun 16 21:35:41 2016

Seeing a lot of these warnings: ./config_builder.h:14:90: warning: token pasting of '','' and VA_ARGS is a GNU extension [-Wgnu-zero-variadic-macro-arguments]

Operating system: FreeBSD 64-bit

Version: 3.1.0

pawelsalawa avatar Jan 18 '18 11:01 pawelsalawa

Originally created at: Thu Jun 16 21:35:41 2016

Yes, SQLiteStudio sourcecode uses variadic macros. For now I don't know a standarized way to implement features I needed, so for now they have to stay.

pawelsalawa avatar Jan 18 '18 11:01 pawelsalawa

Originally created at: Thu Jun 16 21:35:41 2016

Clang says that to silence the warning -Wgnu-zero-variadic-macro-arguments needs to be added, I think.

pawelsalawa avatar Jan 18 '18 11:01 pawelsalawa

Originally created at: Thu Jun 16 21:35:41 2016

It's a bit more complicated. I think they have answer here http://stackoverflow.com/questions/26932749/how-can-wgnu-zero-variadic-macro-arguments-warning-be-turned-off-with-clang

I will try it out when I have a little time for it.

pawelsalawa avatar Jan 18 '18 11:01 pawelsalawa

Originally created at: Thu Jun 16 21:35:41 2016

Status changed to assigned

pawelsalawa avatar Jan 18 '18 11:01 pawelsalawa

fwiw, the warning is still shown with clang 13 on OpenBSD:

../../../SQLiteStudio3/coreSQLiteStudio/config_builder.h:14:90: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]

landryb avatar Feb 04 '23 07:02 landryb

Yes. The issue is still open, as there are more important things than getting rid of a warning, which actually is not that simple as it may look like.

pawelsalawa avatar Feb 04 '23 12:02 pawelsalawa