Skip to content

Commit

Permalink
set attribute specifier before namespace name
Browse files Browse the repository at this point in the history
That is correct C++. GCC (and apparently Clang) accept it after the name
for compatibility with the old __attribute__ syntax.

Change-Id: Ie7f3adaaed83198ca1c61bc0efdf51634e457b07
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
sav-ix committed Mar 9, 2018
1 parent c082d84 commit 4d20485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/auto/other/compiler/tst_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ QT_WARNING_DISABLE_GCC("-Wunused-local-typedefs")
[[noreturn]] void attribute_f1();
void attribute_f2 [[noreturn]] ();
# if (defined(__cpp_namespace_attributes) && __cpp_namespace_attributes >= 201411) && __has_cpp_attribute(deprecated)
namespace NS [[deprecated]] { }
namespace [[deprecated]] NS { }
# endif
#endif

Expand Down

0 comments on commit 4d20485

Please sign in to comment.