public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] hppa: Export main in pr104869.C on hpux
@ 2023-11-23 20:52 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2023-11-23 20:52 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

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  <danglin@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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-23 20:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23 20:52 [committed] hppa: Export main in pr104869.C on hpux John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).