This fixes a hpux linker warning about main not being exported.

Committed to trunk.

Dave
---

hppa: Export main in pr104869.C on hpux

This is needed to avoid a linker warning.

2023-11-23  John David Anglin  <dang...@gcc.gnu.org>

gcc/testsuite/ChangeLog:

        * g++.dg/pr104869.C: Export main on hpux.

diff --git a/gcc/testsuite/g++.dg/pr104869.C b/gcc/testsuite/g++.dg/pr104869.C
index 9a6ef88adbd..13a39fccdb9 100644
--- a/gcc/testsuite/g++.dg/pr104869.C
+++ b/gcc/testsuite/g++.dg/pr104869.C
@@ -68,6 +68,9 @@ struct ControlFlow {
     foo(2);
   return false;
 }
+#ifdef __hpux__
+extern int main(void);
+#endif
 int
 main() {
   ControlFlow cf = { nullptr, ControlFlow::UnwindType::EE };

Attachment: signature.asc
Description: PGP signature

Reply via email to