Comments (7)
Sorry, I cannot investigate the problems because I don't have AIX.
So, can you share more detailed information below?
(1) the header file that defines FALSE
macro conflicting with PackCC's one
(2) whether char
type is surely recognized as a signed integer type in the compiler or not (like C++)
(3) whether the macro __SIZEOF_SIZE_T__
is defined in the system headers or not (can be checked by the command 'echo | gcc -std=gnu89 -dM -E - | grep __SIZEOF_SIZE_T__
')
from packcc.
Answer to (1)
The header file /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/sys/types.h defines the FLASE and TRUE macros types.h.txt.
Answer to (2)
I have compiled
#include <stdio.h>
int main(void) {
printf("%d\n", (char)-1 < 0);
return 0;
}
with
gcc -std=gnu89 -Wall -Wextra -Wno-unused-parameter -Wno-overlength-strings -pedantic -O0 -g2 main.c
Executing a.out returns 0 (false). That means char type is not a signed integer type. Using the compiler option -fsigned-char the result is 1 (true).
Answer to (3)
echo | gcc -std=gnu89 -dM -E - | grep __SIZEOF_SIZE_T__
#define __SIZEOF_SIZE_T__ 4
from packcc.
Thanks for the information.
--
About (1):
OK, AIX's sys/types.h
header file defines the macros.
I think that it's none of AIX's business.
Anyway, they might exist due to historical reasons.
Can you insert undef
lines in packcc.c
as follows?
#ifndef __attribute__
#define __attribute__(x)
#endif
+ #undef TRUE
+ #undef FALSE
#define VERSION "1.5.0"
About (2):
As you said, can you add -fsigned-char
compiler option?
I didn't know that there are platforms where the default char
type is unsigned even in C.
About (3);
Currently, I don't find the cause of the warning of x |= x >> 32;
.
This line should be excluded by #if
directive when size_t
is a 4-byte data type.
#if (defined __SIZEOF_SIZE_T__ && __SIZEOF_SIZE_T__ == 8) /* gcc or clang */ || defined _WIN64 /* MSVC */
x |= x >> 32;
#endif
Can you investigate this unexpected behavior using gcc for AIX?
--
I'll commit the modifications, after you confirmed that compilation and execution are successfully done.
from packcc.
About (3):
I forgot to push the commit 6035daa.
#if ... || !defined _M_IX86
--> #if ... || defined _WIN64
This should fix the problem regarding x |= x >> 32;
.
Please confirm it.
from packcc.
I pushed the commits that might fix this issue.
Can you confirm compilation and execution on your AIX environment?
cd build/gcc
make
make check # bats-core and uncrustify are required (see tests/README.md)
from packcc.
make runs without any issue. As you have already noticed I am not able to run make check due to the missing tools. If you don't mind (?!) I am skipping this because this drives me too far away from my original goal to compile universal-ctags that packcc was a part of.
I am considering this issue as solved. Thanks for your help.
from packcc.
OK, I close this issue.
from packcc.
Related Issues (20)
- Actions that runs before the end of parsing. HOT 8
- Simple grammar goes into an infinite loop instead of erroring HOT 1
- `$n` should be independent across alternatives HOT 4
- C predicates HOT 2
- Peg only mode? HOT 9
- Parser very slow with repeated parse calls HOT 3
- Lexical state support HOT 5
- Import support HOT 10
- Questions not answered in the README HOT 12
- Passing auxil to PCC_DEBUG HOT 3
- AST Mode HOT 11
- Uninitialized variables HOT 8
- value passthrough HOT 4
- parser reads more data than necessary HOT 3
- Strange bad generated parser HOT 5
- Memory usage compared to gcc compiler HOT 13
- raising error from action? HOT 2
- %value and memory management HOT 2
- Consider add support for UCD(Unicode Character Database) rule pattern HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packcc.