http://llvm.org/bugs/show_bug.cgi?id=22538
Bug ID: 22538
Summary: <ctype.h> doesn't handle -fpack-struct
Product: clang
Version: unspecified
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: Headers
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The <ctype.h> header doesn't protect itself from being included in source code
when "-fpack-struct" is being used with a non-default value. This causes the
is* macros to mis-read the required structs
This is on a 64-bit version of FreeBSD 10.0, should that make a difference.
========== istest.c
#include <stdio.h>
#include <ctype.h>
int main(int argc,char *argv[])
{
printf("isalnum('z') returns %d\n",isalnum('z'));
}
==========
When compiled with the simple:
clang -o istest istest.c
you get the expected "1" result.
However, when compiled with 2-byte packing:
clang -fpack-struct-2 -o istest istest.c
you get "0" for the output.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs