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

Tons of warnings about using-declaration in utils/Flags.h #3277

Closed
wangkuiyi opened this issue Aug 5, 2017 · 3 comments
Closed

Tons of warnings about using-declaration in utils/Flags.h #3277

wangkuiyi opened this issue Aug 5, 2017 · 3 comments
Assignees

Comments

@wangkuiyi
Copy link
Collaborator

The building log is full of

[10:40:34]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:34]W:	 [Step 1/1] 
[10:40:34] :	 [Step 1/1] [ 86%] Linking CXX executable test_Evaluator
[10:40:35] :	 [Step 1/1] [ 86%] Building CXX object paddle/gserver/tests/CMakeFiles/test_ConvUnify.dir/LayerGradUtil.cpp.o
[10:40:37] :	 [Step 1/1] [ 86%] Built target test_ExecViaCpu
[10:40:37] :	 [Step 1/1] Scanning dependencies of target test_WarpCTCLayer
[10:40:37] :	 [Step 1/1] [ 86%] Building CXX object paddle/gserver/tests/CMakeFiles/test_WarpCTCLayer.dir/test_WarpCTCLayer.cpp.o
[10:40:37] :	 [Step 1/1] Scanning dependencies of target test_CRFLayerGrad
[10:40:37] :	 [Step 1/1] [ 86%] Building CXX object paddle/gserver/tests/CMakeFiles/test_CRFLayerGrad.dir/test_CRFLayerGrad.cpp.o
[10:40:37] :	 [Step 1/1] [ 87%] Linking CXX executable test_BatchNorm
[10:40:38]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:38]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:38]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:38]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:38]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:38]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:38]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:38]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:38]W:	 [Step 1/1] 
[10:40:39] :	 [Step 1/1] [ 87%] Built target test_perturbation
[10:40:39] :	 [Step 1/1] [ 87%] Building CXX object paddle/gserver/tests/CMakeFiles/test_CRFLayerGrad.dir/LayerGradUtil.cpp.o
[10:40:39] :	 [Step 1/1] [ 87%] Built target test_argument
[10:40:39] :	 [Step 1/1] Scanning dependencies of target test_DetectionOutput
[10:40:39] :	 [Step 1/1] [ 87%] Building CXX object paddle/gserver/tests/CMakeFiles/test_DetectionOutput.dir/test_DetectionOutput.cpp.o
[10:40:40] :	 [Step 1/1] [ 87%] Built target test_GpuProfiler
[10:40:40] :	 [Step 1/1] [ 87%] Building CXX object paddle/gserver/tests/CMakeFiles/test_DetectionOutput.dir/LayerGradUtil.cpp.o
[10:40:40] :	 [Step 1/1] [ 87%] Built target test_SparseMatrix
[10:40:40]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40] :	 [Step 1/1] Scanning dependencies of target test_ProtoDataProvider
[10:40:40] :	 [Step 1/1] [ 87%] Building CXX object paddle/gserver/tests/CMakeFiles/test_ProtoDataProvider.dir/test_ProtoDataProvider.cpp.o
[10:40:40] :	 [Step 1/1] [ 87%] Linking CXX executable test_WarpCTCLayer
[10:40:40]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:40]W:	 [Step 1/1] 
[10:40:40] :	 [Step 1/1] [ 87%] Linking CXX executable test_ConvUnify
[10:40:41]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:41]W:	 [Step 1/1] 
[10:40:41] :	 [Step 1/1] [ 87%] Built target test_common
[10:40:42] :	 [Step 1/1] Scanning dependencies of target test_PriorBox
[10:40:42] :	 [Step 1/1] [ 87%] Building CXX object paddle/gserver/tests/CMakeFiles/test_PriorBox.dir/test_PriorBox.cpp.o
[10:40:42] :	 [Step 1/1] Scanning dependencies of target test_ConvTrans
[10:40:42] :	 [Step 1/1] [ 87%] Building CXX object paddle/gserver/tests/CMakeFiles/test_ConvTrans.dir/test_ConvTrans.cpp.o
[10:40:42] :	 [Step 1/1] [ 87%] Built target test_Evaluator
[10:40:42] :	 [Step 1/1] [ 88%] Building CXX object paddle/gserver/tests/CMakeFiles/test_PriorBox.dir/LayerGradUtil.cpp.o
[10:40:44] :	 [Step 1/1] [ 88%] Built target test_BatchNorm
[10:40:44] :	 [Step 1/1] Scanning dependencies of target test_RecurrentGradientMachine
[10:40:44] :	 [Step 1/1] [ 88%] Building CXX object paddle/gserver/tests/CMakeFiles/test_RecurrentGradientMachine.dir/test_RecurrentGradientMachine.cpp.o
[10:40:44] :	 [Step 1/1] [ 88%] Linking CXX executable test_ProtoDataProvider
[10:40:44]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:44]W:	 [Step 1/1] 
[10:40:44]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:44]W:	 [Step 1/1] 
[10:40:45]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45] :	 [Step 1/1] Scanning dependencies of target test_ActivationGrad
[10:40:45] :	 [Step 1/1] [ 88%] Building CXX object paddle/gserver/tests/CMakeFiles/test_ActivationGrad.dir/test_ActivationGrad.cpp.o
[10:40:45] :	 [Step 1/1] [ 88%] Linking CXX executable test_CRFLayerGrad
[10:40:45]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:45]W:	 [Step 1/1] 
[10:40:45] :	 [Step 1/1] [ 88%] Linking CXX executable test_DetectionOutput
[10:40:46]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:46]W:	 [Step 1/1] 
[10:40:46]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:46]W:	 [Step 1/1] 
[10:40:46]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:46]W:	 [Step 1/1] 
[10:40:46]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:46]W:	 [Step 1/1] 
[10:40:46]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:46]W:	 [Step 1/1] 
[10:40:46]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:46]W:	 [Step 1/1] 
[10:40:46] :	 [Step 1/1] [ 88%] Building CXX object paddle/gserver/tests/CMakeFiles/test_ConvTrans.dir/LayerGradUtil.cpp.o
[10:40:46] :	 [Step 1/1] [ 89%] Building CXX object paddle/gserver/tests/CMakeFiles/test_ActivationGrad.dir/LayerGradUtil.cpp.o
[10:40:48]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:48]W:	 [Step 1/1] 
[10:40:48] :	 [Step 1/1] [ 89%] Built target test_WarpCTCLayer
[10:40:48] :	 [Step 1/1] Scanning dependencies of target test_LinearChainCRF
[10:40:48] :	 [Step 1/1] [ 89%] Building CXX object paddle/gserver/tests/CMakeFiles/test_LinearChainCRF.dir/test_LinearChainCRF.cpp.o
[10:40:48] :	 [Step 1/1] [ 89%] Built target test_ConvUnify
[10:40:48] :	 [Step 1/1] [ 89%] Linking CXX executable test_PriorBox
[10:40:48] :	 [Step 1/1] Scanning dependencies of target test_MultinomialSampler
[10:40:49] :	 [Step 1/1] [ 89%] Building CXX object paddle/gserver/tests/CMakeFiles/test_MultinomialSampler.dir/test_MultinomialSampler.cpp.o
[10:40:49] :	 [Step 1/1] [ 89%] Linking CXX executable test_RecurrentGradientMachine
[10:40:49] :	 [Step 1/1] Scanning dependencies of target test_PyDataProvider
[10:40:49] :	 [Step 1/1] [ 89%] Building CXX object paddle/gserver/tests/CMakeFiles/test_PyDataProvider.dir/test_PyDataProvider.cpp.o
[10:40:51] :	 [Step 1/1] [ 89%] Linking CXX executable test_MultinomialSampler
[10:40:51]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51] :	 [Step 1/1] [ 89%] Linking CXX executable test_LinearChainCRF
[10:40:51]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:51]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:51]W:	 [Step 1/1] 
[10:40:52]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:52]W:	 [Step 1/1] 
[10:40:52]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:52]W:	 [Step 1/1] 
[10:40:52]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:52]W:	 [Step 1/1] 
[10:40:52]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:52]W:	 [Step 1/1] 
[10:40:52]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:52]W:	 [Step 1/1] 
[10:40:52]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
[10:40:52]W:	 [Step 1/1] 
[10:40:52] :	 [Step 1/1] [ 90%] Linking CXX executable test_ActivationGrad
[10:40:52] :	 [Step 1/1] [ 90%] Linking CXX executable test_ConvTrans
[10:40:52] :	 [Step 1/1] [ 90%] Built target test_ProtoDataProvider
[10:40:52] :	 [Step 1/1] [ 90%] Built target test_CRFLayerGrad
[10:40:53] :	 [Step 1/1] Scanning dependencies of target test_NetworkCompare
[10:40:53] :	 [Step 1/1] [ 91%] Linking CXX executable test_PyDataProvider
[10:40:53] :	 [Step 1/1] [ 91%] Building CXX object paddle/gserver/tests/CMakeFiles/test_NetworkCompare.dir/test_NetworkCompare.cpp.o
[10:40:53] :	 [Step 1/1] Scanning dependencies of target test_RecurrentLayer
[10:40:53] :	 [Step 1/1] [ 92%] Building CXX object paddle/gserver/tests/CMakeFiles/test_RecurrentLayer.dir/test_RecurrentLayer.cpp.o
[10:40:54] :	 [Step 1/1] [ 92%] Built target test_DetectionOutput
[10:40:54] :	 [Step 1/1] Scanning dependencies of target test_PyDataProvider2
[10:40:54] :	 [Step 1/1] [ 92%] Building CXX object paddle/gserver/tests/CMakeFiles/test_PyDataProvider2.dir/test_PyDataProvider2.cpp.o
[10:40:56] :	 [Step 1/1] [ 92%] Built target test_PriorBox
[10:40:57]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(362): warning: using-declaration ignored -- it refers to the current namespace
[10:40:57]W:	 [Step 1/1] 
[10:40:57]W:	 [Step 1/1] /paddle/build/third_party/install/glog/include/glog/logging.h(369): warning: using-declaration ignored -- it refers to the current namespace
[10:40:57]W:	 [Step 1/1] 
[10:40:57] :	 [Step 1/1] Scanning dependencies of target test_LayerGrad
[10:40:57] :	 [Step 1/1] [ 92%] Linking CXX executable test_RecurrentLayer
[10:40:57] :	 [Step 1/1] [ 92%] Building CXX object paddle/gserver/tests/CMakeFiles/test_LayerGrad.dir/test_LayerGrad.cpp.o
[10:40:57]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(27): warning: using-declaration ignored -- it refers to the current namespace
[10:40:57]W:	 [Step 1/1] 
[10:40:57]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(28): warning: using-declaration ignored -- it refers to the current namespace
[10:40:57]W:	 [Step 1/1] 
[10:40:57]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(31): warning: using-declaration ignored -- it refers to the current namespace
[10:40:57]W:	 [Step 1/1] 
[10:40:57]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(32): warning: using-declaration ignored -- it refers to the current namespace
[10:40:57]W:	 [Step 1/1] 
[10:40:57]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(40): warning: using-declaration ignored -- it refers to the current namespace
[10:40:57]W:	 [Step 1/1] 
[10:40:57]W:	 [Step 1/1] /paddle/paddle/utils/Flags.h(42): warning: using-declaration ignored -- it refers to the current namespace
@wangkuiyi wangkuiyi self-assigned this Aug 5, 2017
@wangkuiyi
Copy link
Collaborator Author

wangkuiyi commented Aug 5, 2017

Close this as there has been one #1117

@wangkuiyi
Copy link
Collaborator Author

wangkuiyi commented Aug 5, 2017

Those warnings about utils/Flags.h are all about DECLARE_string:

DECLARE_string(nics);
DECLARE_string(rdma_tcp);
DECLARE_string(comment);
...

The same case with those warnings about glog/logging.h:

DECLARE_string(log_dir);
DECLARE_string(log_link);

Right above these two lines, there is the definition of DECLARE_string:

// Special case for string, because we have to specify the namespace
// std::string, which doesn't play nicely with our FLAG__namespace hackery.
#define DECLARE_string(name)                                            \
  namespace fLS {                                                       \
    extern GOOGLE_GLOG_DLL_DECL std::string& FLAGS_##name;              \
  }                                                                     \
  using fLS::FLAGS_##name
#endif

But don't be fooled -- above macro definition was surrounded by #ifndef DECLARE_VARIABLE, and this condition doesn't satisfy because glog/logging.h includes gflags/gflags, which in turn includes gflags/gflags_declare.h, which defines macro DECLARE_VARIABLE and DECLARE_string as:

#define DECLARE_string(name) \
  /* We always want to import declared variables, dll or no */ \
  namespace fLS { \
  using ::fLS::clstring; \
  extern GFLAGS_DLL_DECLARE_FLAG ::fLS::clstring& FLAGS_##name; \
  } \
  using fLS::FLAGS_##name

It looks to me that it's using ::fLS::clstring; \ who caused the warning.

Above source code is the most recent version of gflags https://github.com/gflags/gflags/blob/master/src/gflags_declare.h.in#L147 downloaded by our cmake/external/gflags.cmake file.

@wangkuiyi
Copy link
Collaborator Author

This PR provides more contexts than #1117 , so open it and close #1117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant