15,878,814 members

# Welcome to the Lounge

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 Re: .NET's Sometimes Nonsensical Logic - Platoon version David On Life1-Mar-24 9:52 David On Life 1-Mar-24 9:52
 Re: .NET's Sometimes Nonsensical Logic - Platoon version haughtonomous27-Mar-24 21:58 haughtonomous 27-Mar-24 21:58
 Re: .NET's Sometimes Nonsensical Logic - Platoon version David On Life28-Mar-24 7:56 David On Life 28-Mar-24 7:56
 Re: .NET's Sometimes Nonsensical Logic Peter Moore - Chicago29-Feb-24 8:10 Peter Moore - Chicago 29-Feb-24 8:10
 Re: .NET's Sometimes Nonsensical Logic Thomas Daniels29-Feb-24 10:36 Thomas Daniels 29-Feb-24 10:36
 Re: .NET's Sometimes Nonsensical Logic jmaida29-Feb-24 12:06 jmaida 29-Feb-24 12:06
 Re: .NET's Sometimes Nonsensical Logic jschell29-Feb-24 12:42 jschell 29-Feb-24 12:42
 Re: .NET's Sometimes Nonsensical Logic jmaida29-Feb-24 14:35 jmaida 29-Feb-24 14:35
 I brought it up a while back and there was some back and forth on it. Apparently, malloc( 0 ) not returning NULL is deliberate. Here is what GCC does with some short bit of code printf("Hello world!\n"); printf( "call malloc(0)\n" ); sz = (char*)malloc(ZERO); printf( "Errno %d\n", errno ); if( sz == NULL ) printf( "returned NULL allocated zero bytes\n"); else printf( "NULL not returned from malloc, allocated 8 bytes\n" ); Hello world! call malloc(0) Errno 0 NULL not returned from malloc, allocated 8 bytes Apparently this is allowed by GCC. The argument is that it was successful Haven't tried it in VS. "A little time, a little trouble, your better day" Badfinger
 Re: .NET's Sometimes Nonsensical Logic jschell1-Mar-24 11:51 jschell 1-Mar-24 11:51
 Re: .NET's Sometimes Nonsensical Logic jmaida1-Mar-24 15:04 jmaida 1-Mar-24 15:04
 Re: .NET's Sometimes Nonsensical Logic Jon McKee29-Feb-24 12:09 Jon McKee 29-Feb-24 12:09
 Re: .NET's Sometimes Nonsensical Logic Ravi Bhavnani29-Feb-24 11:51 Ravi Bhavnani 29-Feb-24 11:51
 Re: .NET's Sometimes Nonsensical Logic David On Life1-Mar-24 10:05 David On Life 1-Mar-24 10:05
 Re: .NET's Sometimes Nonsensical Logic HobbyProggy29-Feb-24 20:13 HobbyProggy 29-Feb-24 20:13
 Re: .NET's Sometimes Nonsensical Logic Martijn Smitshoek29-Feb-24 22:23 Martijn Smitshoek 29-Feb-24 22:23
 Re: .NET's Sometimes Nonsensical Logic haughtonomous1-Mar-24 1:21 haughtonomous 1-Mar-24 1:21
 Re: .NET's Sometimes Nonsensical Logic Peter Moore - Chicago1-Mar-24 3:00 Peter Moore - Chicago 1-Mar-24 3:00
 Re: .NET's Sometimes Nonsensical Logic lmoelleb1-Mar-24 2:17 lmoelleb 1-Mar-24 2:17
 Re: .NET's Sometimes Nonsensical Logic Peter Moore - Chicago1-Mar-24 4:01 Peter Moore - Chicago 1-Mar-24 4:01
 Re: .NET's Sometimes Nonsensical Logic MSBassSinger1-Mar-24 3:58 MSBassSinger 1-Mar-24 3:58
 Re: .NET's Sometimes Nonsensical Logic R.Kramer1-Mar-24 4:07 R.Kramer 1-Mar-24 4:07
 Re: .NET's Sometimes Nonsensical Logic Peter Moore - Chicago1-Mar-24 5:50 Peter Moore - Chicago 1-Mar-24 5:50
 Re: .NET's Sometimes Nonsensical Logic Member 101590881-Mar-24 6:17 Member 10159088 1-Mar-24 6:17
 Re: .NET's Sometimes Nonsensical Logic ShawnVN1-Mar-24 8:11 ShawnVN 1-Mar-24 8:11
 Re: .NET's Sometimes Nonsensical Logic jschell1-Mar-24 12:15 jschell 1-Mar-24 12:15
 Last Visit: 31-Dec-99 18:00     Last Update: 15-Apr-24 18:53 Refresh ᐊ Prev1...109110111112113114115116117118 Next ᐅ