Article View: gnu.gcc.bug
Article #1242gcc bug
From: Joe Fasano
Date: Fri, 02 Oct 1992 15:03
Date: Fri, 02 Oct 1992 15:03
61 lines
1991 bytes
1991 bytes
I am running gcc-2.2.2 on a sparcstation running
SunOS 4.1.2.
This bug is also on DECstation OSF/1
and older versions of gcc.
I am running gcc-2.2.2 on a sparcstation running
SunOS 4.1.2
This bug also appears on DecStation OSF/1
and on older gcc compilers.
#define TEMPFILE "/tmp/cvXXXXXX"
main()
{
char* tmp_file, *mktemp();
if (!(tmp_file = mktemp(TEMPFILE)) || !strcmp(tmp_file, ""))
printf("ERROR\n");
else
printf("tmp_file = '%s'\n",tmp_file);
}
/*----------- Workaround ------------*/
#ifdef __GNUC__
static char TEMPFILE[256]; /*bug in GNUC mktemp(), want's to core dump on short arrays */
#endif
main()
{
char* tmp_file, *mktemp();
#ifdef __GNUC__
strcpy (TEMPFILE,"/tmp/cvXXXXXX");
#endif
if (!(tmp_file = mktemp(TEMPFILE)) || !strcmp(tmp_file, ""))
printf("ERROR\n");
else
printf("tmp_file = '%s'\n",tmp_file);
}
joe@veritas.com
-----------------------------------------------------------------------------
Joe Fasano Internet: joe@veritas.com
Veritas Software uucp: ...!{apple,pyramid}!veritas!joe
4800 Great America Pkwy, Ste 420
Santa Clara, CA 95054 Phone: 408-727-1222
joe@veritas.com
-----------------------------------------------------------------------------
Joe Fasano Internet: joe@veritas.com
Veritas Software uucp: ...!{apple,pyramid}!veritas!joe
4800 Great America Pkwy, Ste 420
Santa Clara, CA 95054 Phone: 408-727-1222
Technical Details
Message-ID:
<m0maoXA-0000cEC@mobius.veritas.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!veritas.COM!joeShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!veritas.COM!joe From: joe@veritas.COM (Joe Fasano) Subject: gcc bug Message-ID: <m0maoXA-0000cEC@mobius.veritas.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 2 Oct 1992 15:03:00 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 62