This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/9837] sizeof( int(*)(int *) ) == 1?
- From: "muhammad_bilal at mentor dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 31 Dec 2012 04:53:50 +0000
- Subject: [Bug gdb/9837] sizeof( int(*)(int *) ) == 1?
- Auto-submitted: auto-generated
- References: <bug-9837-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=9837
bilal <muhammad_bilal at mentor dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |muhammad_bilal at mentor
| |dot com
--- Comment #3 from bilal <muhammad_bilal at mentor dot com> 2012-12-31 04:53:50 UTC ---
Hi ALL
The sizeof operator return 1 when it operates on function name like
e.g
sizeof(int())=1
sizeof(float())=1
sizeof(main)=1
sizeof(printf)=1
etc
Its the gcc grammatical rule
the problem discuss here
http://stackoverflow.com/questions/3838866/what-is-the-sizeofmain-sizeofprintf-sizeofscanf
Regards,
Bilal
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.