Click here to Skip to main content
15,891,136 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.

 
GeneralRe: Wordle 542 Pin
StarNamer@work13-Dec-22 3:36
professionalStarNamer@work13-Dec-22 3:36 
JokeStyle question Pin
honey the codewitch12-Dec-22 15:03
mvahoney the codewitch12-Dec-22 15:03 
GeneralRe: Style question Pin
David O'Neil12-Dec-22 15:47
professionalDavid O'Neil12-Dec-22 15:47 
GeneralRe: Style question Pin
honey the codewitch12-Dec-22 15:50
mvahoney the codewitch12-Dec-22 15:50 
GeneralRe: Style question Pin
David O'Neil12-Dec-22 15:58
professionalDavid O'Neil12-Dec-22 15:58 
GeneralRe: Style question Pin
jmaida12-Dec-22 16:22
jmaida12-Dec-22 16:22 
GeneralRe: Style question Pin
honey the codewitch12-Dec-22 20:33
mvahoney the codewitch12-Dec-22 20:33 
GeneralRe: Style question Pin
k505413-Dec-22 3:19
mvek505413-Dec-22 3:19 
It would actually depend on your libc implementation, not the compiler. Using RedHat Rawhide, I get the following:
Terminal
[k5054@localhost tmp]$ cat example.c 
#include <stdio.h>
#include <stdlib.h>

int main()
{
    char *s = malloc(0);
    printf("s = %p\n", s);
    free(s);
    return 0;
}
[k5054@localhost tmp]$ gcc --version
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[k5054@localhost tmp]$ gcc -Wall -Wextra example.c -o example
[k5054@localhost tmp]$ ./example 
s = 0x182f2a0
[k5054@localhost tmp]$ 
Maybe if you're cross compiling for your controller du jour, its libc is doing that?
Keep Calm and Carry On

GeneralRe: Style question Pin
honey the codewitch13-Dec-22 4:09
mvahoney the codewitch13-Dec-22 4:09 
GeneralRe: Style question Pin
jmaida13-Dec-22 10:17
jmaida13-Dec-22 10:17 
GeneralRe: Style question Pin
Daniel Pfeffer13-Dec-22 10:44
professionalDaniel Pfeffer13-Dec-22 10:44 
GeneralRe: Style question Pin
jmaida13-Dec-22 15:42
jmaida13-Dec-22 15:42 
GeneralRe: Style question Pin
Daniel Pfeffer13-Dec-22 22:16
professionalDaniel Pfeffer13-Dec-22 22:16 
GeneralRe: Style question Pin
jmaida14-Dec-22 11:37
jmaida14-Dec-22 11:37 
GeneralRe: Style question Pin
Daniel Pfeffer14-Dec-22 11:52
professionalDaniel Pfeffer14-Dec-22 11:52 
GeneralRe: Style question Pin
jmaida14-Dec-22 12:08
jmaida14-Dec-22 12:08 
GeneralRe: Style question Pin
trønderen14-Dec-22 11:55
trønderen14-Dec-22 11:55 
GeneralRe: Style question Pin
jmaida14-Dec-22 12:10
jmaida14-Dec-22 12:10 
GeneralRe: Style question Pin
jmaida15-Dec-22 16:10
jmaida15-Dec-22 16:10 
GeneralRe: Style question Pin
Mircea Neacsu12-Dec-22 16:55
Mircea Neacsu12-Dec-22 16:55 
GeneralRe: Style question Pin
jmaida12-Dec-22 18:48
jmaida12-Dec-22 18:48 
GeneralRe: Style question Pin
k505413-Dec-22 3:07
mvek505413-Dec-22 3:07 
GeneralRe: Style question Pin
Mircea Neacsu13-Dec-22 9:13
Mircea Neacsu13-Dec-22 9:13 
GeneralRe: Style question Pin
jmaida13-Dec-22 10:30
jmaida13-Dec-22 10:30 
GeneralRe: Style question Pin
honey the codewitch12-Dec-22 20:33
mvahoney the codewitch12-Dec-22 20:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.