Fix -Wno-duplicate-decl-specifier is valid for C/ObjC but not for C++ (#164552)

Fixes #99715
Pull Request resolved: https://github.com/pytorch/pytorch/pull/164552
Approved by: https://github.com/Skylion007
This commit is contained in:
Yuanyuan Chen
2025-10-03 20:12:45 +00:00
committed by PyTorch MergeBot
parent 3ca09d65f1
commit 2d50678dcc

View File

@ -1013,7 +1013,6 @@ if(USE_ROCM)
list(APPEND HIP_CXX_FLAGS -DTORCH_HIP_VERSION=${TORCH_HIP_VERSION})
list(APPEND HIP_CXX_FLAGS -Wno-shift-count-negative)
list(APPEND HIP_CXX_FLAGS -Wno-shift-count-overflow)
list(APPEND HIP_CXX_FLAGS -Wno-duplicate-decl-specifier)
list(APPEND HIP_CXX_FLAGS -DCAFFE2_USE_MIOPEN)
list(APPEND HIP_CXX_FLAGS -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_HIP)
list(APPEND HIP_CXX_FLAGS -std=c++17)