Commit 742a0ed
PR #1789: Add missing #ifdef pp directive to the TypeName() function in the layout.h
Imported from GitHub PR #1789
If code is being compiled without support for the RTTI, ABSL_INTERNAL_HAS_RTTI pp macro is not defined in the absl/base/config.h (otherwise, if RTTI is supported, it is defined to 1)
Rn this macro is used in the absl/flags/internal/flag.h, absl/flags/internal/flag.cc, absl/types/any.h and absl/container/internal/layout.h. In the first three files it is used like `#ifdef ABSL_INTERNAL_HAS_RTTI`. In the layout.h it is used like `#if ABSL_INTERNAL_HAS_RTTI` which causes trouble if code that uses absl is being compiled with the Wundef warning flag (at least when gcc or clang are used)
Since ABSL_INTERNAL_HAS_RTTI is not defined when RTTI is not used, it seems like it should be used as `#ifdef ABSL_INTERNAL_HAS_RTTI` in the layout.h
Merge 437e7c1 into c7cf999
Merging this change closes #1789
COPYBARA_INTEGRATE_REVIEW=#1789 from i80287:add-missing-ifdef 437e7c1
PiperOrigin-RevId: 702377421
Change-Id: I3241b573d496adba4870c8e4742c3ee7598417211 parent a3f7e98 commit 742a0ed
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
0 commit comments