Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Joe Fasano
Fri, 02 Oct 1992 15:03
gcc bug
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads