Issue Details (XML | Word | Printable)

Key: PCC-77
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Detlef Riekenberg
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

autoconf failed to detect ANSI C headers with pcc (regression)

Created: 12/Aug/09 12:59 AM   Updated: 13/Aug/09 08:49 PM
Component/s: C preprocessor
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File headers.c (0.8 kB)

Environment: i386 linux (Ubuntu 8.04)


 Description  « Hide
The ANSI C header detection in the autoconf script worked 3 weeks ago

With debug output, the pcc compiled version failed with:
097: islower: 512, ISLOWER: 1, toupper: 65, TOUPPER: 97

Another difference, that might be related:
gcc and tcc use the "#if" part, while pcc need the "#else" part in the code

#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') || ('j' <= (c) && (c) <= 'r') || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif


--
By by ... Detlef




 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 13/Aug/09 07:00 PM
Fixed. Evaluation of character constants had disappeared from yylex().

Detlef Riekenberg added a comment - 13/Aug/09 08:49 PM
Thanks.
pcc is now using the "#if" part.

As additional info:
The "#else" part failed for gcc, pcc and tcc.
autoconf is using macros for a really wired encoding.

--
By by ... Detlef