Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flag pedantic errors #20

Merged
merged 3 commits into from Dec 22, 2018

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Dec 15, 2018

gcc以外のコンパイラにも対応しやすくするためにオプション-pedantic-errorsを追加してコンパイラの拡張機能を禁止します。修正の詳細は b46e404 を見てください。

その他

  • gitのリポジトリでビルドしているときはマクロを使わずgitのリビジョンから日付を取得することをjdversion.hに説明コメントを追加する。またマクロの名前をJDDATEからJDDATE_FALLBACKに変更する。 ( 405da09 )
  • std::threadのデバッグ用コードが壊れていたのを修正する。 ( 69da80e )

バージョン番号とgitリビジョンについて説明をjdversion.hに追加する
コンパイラの拡張機能を禁止し標準に準拠する。

./configureの引数に与えられたCXXFLAGSをJDのフラグより後ろに展開する。
clangは後ろのフラグを優先するため前で展開すると上書きできない場合がある。
@yama-natuki yama-natuki merged commit f4032cf into JDimproved:test Dec 22, 2018
@yama-natuki
Copy link
Collaborator

ありがとうございます。

@ma8ma ma8ma deleted the use-flag-pedantic-errors branch December 22, 2018 08:56
@mtasaka
Copy link
Collaborator

mtasaka commented Dec 23, 2018

JD側でないですが、GLibの方でerrorになってしまいますが、どうしますかね...

In file included from /usr/include/glib-2.0/glib.h:62,
                 from /usr/include/glibmm-2.4/glibmm/thread.h:38,
                 from /usr/include/glibmm-2.4/glibmm.h:88,
                 from ../../src/skeleton/dispatchable.h:15,
                 from ../../src/skeleton/loadable.h:47,
                 from root.h:13,
                 from interface.cpp:7:
/usr/include/glib-2.0/glib/gmessages.h:371:23: error: ISO C++ does not permit named variadic macros [-Wvariadic-macros]
 #define g_error(format...)    G_STMT_START {                 \
                       ^~~

@ma8ma
Copy link
Collaborator Author

ma8ma commented Dec 23, 2018

@mtasaka ご不便をおかけしてすみません。ライブラリを考えていませんでした。 😓
-pedantic-errorsのかわりに-pedantic(警告)を使うPRを出します。ライブラリの警告は各自で無視or./configure CXXFLAGS="-Wno-hoge"で抑制するで大丈夫でしょうか。

ma8ma added a commit to ma8ma/JDim that referenced this pull request Dec 23, 2018
ライブラリヘッダーのエラーを避けるためコンパイラの拡張機能は警告にする
JDimproved#20 (comment)
@mtasaka
Copy link
Collaborator

mtasaka commented Dec 24, 2018

取り敢えず私は -Wno-variadic-macros で一旦逃げましたが、「ライブラリの警告は各自で無視」でいいと思います。

ma8ma added a commit to ma8ma/JDim that referenced this pull request Dec 24, 2018
testブランチの更新をgtk3-previewに反映する
* JDimproved#20
* JDimproved#21

Closes #17
@ma8ma ma8ma added feature 機能の追加と削除 bugfix bug バグの追跡 and removed bugfix labels Feb 28, 2019
@ma8ma ma8ma added the build ビルドに関するトピック label Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug バグの追跡 build ビルドに関するトピック feature 機能の追加と削除
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants