Talk:C data types

message: I was annoyed to see that a lot of the useful information on this page has been purged.  Please compare: http://en.wikipedia.org/w/index.php?title=C_data_types&diff=prev&oldid=456503038
The reason was because it is available on Wiki-Books... Ok, but where is the link to the info?  There are two complete *books* on that page, and I was looking specifically for the different pointer/array/function examples (pointer-to-pointer, pointer-to-array, how modifiers fit into that, etc).
If that sort of information doesn't belong on Wikipedia -- fine.  But at least link to more information in WikiBooks if that is why the information is being purged.
68.54.162.15 (talk) 08:33, 30 June 2012 (UTC)
thread_title:  Missing Information 

message: It's not true there are 4 basic types; that's just the way you've chosen to introduce them.  The C90 standard has more like twelve.  You don't mention several other built-in types.
C99 introduces long long, complex and imaginary types, and _Bool.
If you think it's worth covering types properly, I'm happy to help.  Akihabara 02:55, 12 July 2005 (UTC)
thread_title:  Variable types 

message: static is not discussed, and should be. And isn't const also used by compilers when optimizing?  If it isn't (i.e. they detect a lack of change on their own) that is interesting enough to mention, IMHO.
:static is not a type qualifier, but a storage class 84.163.217.217 (talk) 17:07, 31 August 2008 (UTC)
thread_title:  type qualifiers 

message: There is at least one more type: Boolean!
Although it is not possible to declare a variable of that type, the Boolean-type is essential to C! Without it, it would not be possible to write a decent if-statement. 
ALbert Mietus // http:albert.mietus.nl —The preceding unsigned comment was added by 62.177.151.49 (talk) 07:41, 2 April 2007 (UTC)
replies: text: No. There is no such type in C. If-statements (and the like) test if the condition is nonzero. --Spoon! 08:07, 2 April 2007 (UTC)
replies: text: Boolean was introduced in C99, so yes, it does exist, but in C89 it is true that if statements simply check if the test is non-zero or not. --FrederikHertzum 17:40, 15 May 2007 (UTC)
thread_title:  One more type: Boolean 

message: Also needs to include struct, union and enum. http://en.wikipedia.org/wiki/C_syntax has some info on these.  —Preceding unsigned comment added by 119.224.35.68 (talk) 00:32, 31 January 2010 (UTC)
thread_title:  Forgetting something 

message: The table in the Size section lists the typical size in bytes of a (long double) as "8 or 12".  I propose changing this to "8, 12, or 16", as 16 is a very common sizeof(long double), as is the case for standard gcc x86-64 on GNU/Linux. --Kamalmostafa (talk) 22:11, 26 November 2010 (UTC)
thread_title:  Typical sizeof(long double) should include 16 

message: There are common keywords used together with variable declarations, this includes "static", "volatile", "extern", "auto", "register". Would be nice if someone knowledgeable about all the quirky details covered all of them! 130.237.57.80 (talk) 15:54, 9 March 2011 (UTC)
replies: text: See C syntax. --RokerHRO (talk) 16:57, 12 August 2012 (UTC)
thread_title:  Relevant keywords 

message: There is a move discussion in progress which affects this page. Please participate at Talk:C standard library - Requested move and not in this talk page section. Thank you.  —RM bot 09:40, 8 November 2011 (UTC)
thread_title: Move discussion in progress

message: It is not mentioned here at all. :-( Even if you cannot declare objects of type void, this type is used to build-up other types, e.g. pointer or function types. --RokerHRO (talk) 21:47, 26 March 2012 (UTC)
replies: text: The C Standard says  (6.2.5p19 Types)
The void type comprises an empty set of values; it is an incomplete object type that
cannot be completed.  — Preceding unsigned comment added by 81.186.243.41 (talk) 15:37, 26 January 2013 (UTC)
thread_title:  What about the basic type ''void''? 

message: The ISO C standard describes 3 categories of types:
# object types
# function types
# incomplete types
Than it describes the arithmetical types (_Bool, integer and floating point types), the derived types (arrays, structures, unions, pointer and function) and finally the so-called "type modifier" (const, volatile, restrict, _Atomic).
Unfortunately there is no clear structure or categorization in the ISO standard. Perhaps there is one in other notable C books, if yes we should use one. What do you think? --RokerHRO (talk) 13:46, 10 June 2015 (UTC)
thread_title:  I'd like to restructure the article so it matches the ISO C standard 

message: Type with "anam" were added. But I found nothing about it after a quick search. It seems to be bullshit. A source would be appreciated, otherwise I think that this weird potential type should be removed.  — Preceding unsigned comment added by RyDroid (talk • contribs) 17:31, 20 November 2016 (UTC)
replies: text: Obvious vandalism. I've reverted the changes from this IP address. Vincent Lefèvre (talk) 17:52, 20 November 2016 (UTC)
thread_title:  anam type: is it bullshit? 

message: It may not be standard C but is it worth talking about it anyway? It is a type of 24 bits for some embedded systems.  — Preceding unsigned comment added by 69.70.87.250 (talk) 19:41, 10 August 2017 (UTC)
replies: text: I don't think it is worth mentioning uncommon extensions. BTW, this way of defining a new integer type is very ugly. A 24-bit type on such a system should have been named int24_t. Vincent Lefèvre (talk) 21:31, 10 August 2017 (UTC)
thread_title:  short long int (or short long) 

message: There are still some types not mentioned in the article which would merit it IMHO like off_t and time_t, which are at the same time
* present in the POSIX standard (see pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html)
* deeply rooted in tradition (look at the 33-year old SysVr2.0_32000/src/uts/ns32000/sys/types.h in archive.org/download/ATTUNIXSystemVRelease4Version2/SysVr2.0_32000.tgz)
* used by Linux, a system of high real-world notability (as in git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/include/linux/types.h)
--212.185.199.2 (talk) 15:31, 12 February 2018 (UTC)
thread_title:  More well-established types missing 

message: The draft for C2x includes requiring 2's complement. The future is now. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2412.pdf 
Maybe this should be noted in the section about int ranges.  Wqwt (talk) 07:28, 15 October 2021 (UTC)
thread_title:  C2x enforces 2's complement 

message: @Johann-Tobias Schäg I have reverted your edit about the signed integer sizes. What was written was correct, since as the note (C data types#cite note-restr-5) says this is exactly the range guaranteed by the C standard. Twos complement is not guaranteed but is drafted for C2x.  Wqwt (talk) 08:18, 9 August 2022 (UTC)
replies: text: BTW, I think that it should be decided what to do when C23 is published. I suppose that the ranges will be updated. But for historical purpose, the alternative signed number representations and the old minimal ranges should still be given somewhere (perhaps in a more concise form). — Vincent Lefèvre (talk) 13:22, 9 August 2022 (UTC)
thread_title:  Signed integer sizes  

message: In the table that lists and describes the data types, couldn’t there be a column with examples of data types so newcomers to C don’t get confused or mix any of them up? Like, obviously a char would be only a single character like ‘c’, ‘S’, ‘3’, or ‘#’. But a float, is it strictly a ~number~ in the decimal place (0.75), or can it be greater (6.432)?
See what I mean? 98.216.67.148 (talk) 02:14, 1 October 2022 (UTC)
thread_title:  Data type examples 

message: The article should really include additional historical context about why these types are specified the way they are, as modern readers may not be familiar with the multiplicity of byte widths, word lengths, and sign representations that existed in the 1980s when X3J11 was trying to specify a set of data types that was common to historic PDP-11 and microcomputer implementations, 32-bit and 36-bit mainframes, and supercomputers. By comparison, many newer languages provide only bit-precise types (and have no support for, e.g., 9-bit characters, because 36-bit architectures are now historical relics). 207.180.169.36 (talk) 18:41, 19 November 2023 (UTC)
replies: text: YES PLEASE! Also, publish the name of the bloke who defined a char to possibly be negative! Need to 'praise' him every-singe-day!  — Preceding unsigned comment added by 115.70.29.185 (talk) 16:18, 4 March 2024 (UTC)
thread_title:  More history context needed 

message: The chart of types sizes lists 'int' as 16 bit (between -32,767 and 32,767), in almost all places int is 32 bits (I have never seen it as 16 bit but I assume it is in older versions?).
If it is really mostly 16 bit, I think a comment "32 bit on some systems" or something like this can be added, or even change it to "16/32" (and change the explanation accordingly) Eylon Shachmon (talk) 01:41, 18 April 2024 (UTC)
replies: text: That column is titled "Minimum size" so 16 is correct. Dexxor (talk) 09:40, 18 April 2024 (UTC)
thread_title:  Int is usually 32 bits and not 16 bits