C ObjC C++ ObjC++ Var(warn_frame_address) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
Warn when __builtin_frame_address or __builtin_return_address is used unsafely.
+Wglobal-module
+C++ ObjC++ Var(warn_global_module) Warning Init(1)
+Warn about the global module fragment not containing only preprocessing directives.
+
Wif-not-aligned
C ObjC C++ ObjC++ Var(warn_if_not_aligned) Init(1) Warning
Warn when the field in a struct is not aligned.
if (!warned)
{
warned = true;
- error_at (token->location,
- "global module fragment contents must be"
- " from preprocessor inclusion");
+ pedwarn (token->location, OPT_Wglobal_module,
+ "global module fragment contents must be"
+ " from preprocessor inclusion");
}
}
}
-Wdeprecated-copy -Wdeprecated-copy-dtor
-Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion
-Weffc++ -Wno-elaborated-enum-base
--Wno-exceptions -Wextra-semi -Wno-inaccessible-base
+-Wno-exceptions -Wextra-semi -Wno-global-module -Wno-inaccessible-base
-Wno-inherited-variadic-ctor -Wno-init-list-lifetime
-Winvalid-constexpr -Winvalid-imported-macros
-Wno-invalid-offsetof -Wno-literal-suffix
@item -Wextra-semi @r{(C++, Objective-C++ only)}
Warn about redundant semicolons after in-class function definitions.
+@opindex Wno-global-module
+@opindex Wglobal-module
+@item -Wno-global-module @r{(C++ and Objective-C++ only)}
+Disable the diagnostic for when the global module fragment of a module
+unit does not consist only of preprocessor directives.
+
@opindex Winaccessible-base
@opindex Wno-inaccessible-base
@item -Wno-inaccessible-base @r{(C++, Objective-C++ only)}
-// { dg-additional-options "-fmodules-ts -Wno-pedantic" }
+// { dg-additional-options "-fmodules-ts -Wno-global-module" }
// { dg-module-cmi friend_6 }
module;
-# 1 "" 1
template <typename> struct Trans_NS___cxx11_basic_string {
template <typename> friend class basic_stringbuf;
};
template struct Trans_NS___cxx11_basic_string<char>;
-# 6 "" 2
export module friend_6;