From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 06704385772D; Thu, 27 Apr 2023 22:01:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06704385772D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682632877; bh=ggYFV+35XjNzC057PJC8zPxgDyQ5ig056UWT/mKetLI=; h=From:To:Subject:Date:From; b=cftm5E5MY8kAEjESTEpGi7zuuuoxBFv1Fuln2nmBPMzWhnqz85NhoiE3XER/6ohfq uVeu/+gHr3o89418GhGPTjbiU5Na6tqvvhHhtunYEwRIK7XE9oTsyE2JGiFw1bLw2/ /UsILAD5GeJUaJb88+WupMaTJrdqVv9HCQjnPM7s= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-10659] libstdc++: Reduce Doxygen output for PDF X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 7ced3e5179ee4fa3efaed5201e2c27c9168fdda0 X-Git-Newrev: b9e35103581cdbd5368ccfbe6dab474f32834246 Message-Id: <20230427220117.06704385772D@sourceware.org> Date: Thu, 27 Apr 2023 22:01:17 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b9e35103581cdbd5368ccfbe6dab474f32834246 commit r11-10659-gb9e35103581cdbd5368ccfbe6dab474f32834246 Author: Jonathan Wakely Date: Wed Apr 26 12:27:59 2023 +0100 libstdc++: Reduce Doxygen output for PDF Including the header source code in the doxygen-generated PDF file makes it too large, and causes pdflatex to run out of memory. If we only set SOURCE_BROWSER=YES for the HTML docs then we won't include the sources in the PDF file. There are several macros defined for std::valarray that are only used to generate repetitive code and then #undef'd. Those aren't useful in the doxygen docs, especially the ones that reuse the same name in different files. Omitting them avoids warnings about duplicate labels in the refman.tex file. libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (SOURCE_BROWSER): Only set to YES for HTML docs. * include/bits/gslice_array.h (_DEFINE_VALARRAY_OPERATOR): Omit from doxygen docs. * include/bits/indirect_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise. * include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise. * include/bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR): Likewise. * include/std/valarray (_DEFINE_VALARRAY_UNARY_OPERATOR) (_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT) (_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT) (_DEFINE_BINARY_OPERATOR): Likewise. (cherry picked from commit afa69618d1627435841c9164b019ef98000e0365) Diff: --- libstdc++-v3/doc/doxygen/user.cfg.in | 2 +- libstdc++-v3/include/bits/gslice_array.h | 2 ++ libstdc++-v3/include/bits/indirect_array.h | 2 ++ libstdc++-v3/include/bits/mask_array.h | 2 ++ libstdc++-v3/include/bits/slice_array.h | 2 ++ libstdc++-v3/include/std/valarray | 2 ++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index eb05c975213..cf8d21c4e5b 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1216,7 +1216,7 @@ USE_MDFILE_AS_MAINPAGE = # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = YES +SOURCE_BROWSER = @do_html@ # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. diff --git a/libstdc++-v3/include/bits/gslice_array.h b/libstdc++-v3/include/bits/gslice_array.h index 4f3309d842e..f8d11855699 100644 --- a/libstdc++-v3/include/bits/gslice_array.h +++ b/libstdc++-v3/include/bits/gslice_array.h @@ -183,6 +183,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Array(_M_index)); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ template \ @@ -214,6 +215,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/bits/indirect_array.h b/libstdc++-v3/include/bits/indirect_array.h index a3dc6059988..bb47855ecea 100644 --- a/libstdc++-v3/include/bits/indirect_array.h +++ b/libstdc++-v3/include/bits/indirect_array.h @@ -174,6 +174,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION indirect_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const { std::__valarray_copy(__e, _M_sz, _M_array, _M_index); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ template \ @@ -203,6 +204,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/bits/mask_array.h b/libstdc++-v3/include/bits/mask_array.h index 3889bd151a6..fb861dac95b 100644 --- a/libstdc++-v3/include/bits/mask_array.h +++ b/libstdc++-v3/include/bits/mask_array.h @@ -174,6 +174,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION mask_array<_Tp>::operator=(const _Expr<_Ex, _Tp>& __e) const { std::__valarray_copy(__e, __e.size(), _M_array, _M_mask); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ template \ @@ -204,6 +205,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/bits/slice_array.h b/libstdc++-v3/include/bits/slice_array.h index bdced19e789..1990a1cddb4 100644 --- a/libstdc++-v3/include/bits/slice_array.h +++ b/libstdc++-v3/include/bits/slice_array.h @@ -245,6 +245,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION slice_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const { std::__valarray_copy(__e, _M_sz, _M_array, _M_stride); } + /// @cond undocumented #undef _DEFINE_VALARRAY_OPERATOR #define _DEFINE_VALARRAY_OPERATOR(_Op,_Name) \ template \ @@ -275,6 +276,7 @@ _DEFINE_VALARRAY_OPERATOR(<<, __shift_left) _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) #undef _DEFINE_VALARRAY_OPERATOR + /// @endcond /// @} group numeric_arrays diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray index 72eb7a9d56d..458c7cd7811 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -1076,6 +1076,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _Expr<_Closure, _Tp>(_Closure(*this, func)); } + /// @cond undocumented #define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name) \ template \ inline typename valarray<_Tp>::template _UnaryOp<_Name>::_Rt \ @@ -1202,6 +1203,7 @@ _DEFINE_BINARY_OPERATOR(<=, __less_equal) _DEFINE_BINARY_OPERATOR(>=, __greater_equal) #undef _DEFINE_BINARY_OPERATOR + /// @endcond #if __cplusplus >= 201103L /**