adaint.c calls mktemp (line 802) and tmpname (line 900). Both calls generate warnings when running gnatlink.
../gcc-4.2.2/configure --prefix=$PREFIX --enable-languages=c,ada,c++ In both cases, there are conditional compiles for the correct/safe function calls. The conditions (line 797 and 887) check for __FreeBSD__, but not __NetBSD__. I have added the check for __NetBSD__ in both places and tested for i386-pc-netbsdelf4.99.35. This changes stopped the warnings. -- Summary: Unsafe calls to mktemp and tmpname Product: gcc Version: 4.2.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aran at 100acres dot us GCC build triplet: i386-pc-netbsdelf4.99.35 GCC host triplet: i386-pc-netbsdelf4.99.35 GCC target triplet: i386-pc-netbsdelf4.99.35 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34553