mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Default to erroring when failing to return from non-void function. (#34663)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/34663 Been bitten by this so many times. Never more. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Differential Revision: D20425480 Pulled By: ezyang fbshipit-source-id: c4489efacc4149c9b57d1b8207cc872970c2501f
This commit is contained in:
parent
d9b97a4ffd
commit
76d9e76b4a
1 changed files with 1 additions and 0 deletions
|
|
@ -445,6 +445,7 @@ if(NOT MSVC)
|
|||
# Details at http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1459
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-type-limits")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-array-bounds")
|
||||
|
|
|
|||
Loading…
Reference in a new issue