sizeof(int[1]) means what ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
i'm reading the file ioctl.h, there i encountered a macro
_IOC_TYPECHECK(t) which looks like:
#define _IOC_TYPECHECK(t) \
	((sizeof(t) == sizeof(t[1]) && \
	  sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
	  sizeof(t) : __invalid_size_argument_for_IOC)

in this code ,what does sizeof(t[1]) mean? i mean the argument of this
macro in a type(int, float), in that case what does sizeof(int[1])
specify? I have written a small test program which prints the value of
the expression 4.

Thank you

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux