Comments (3)
Hi Lionfaith,
I too am unsure whether to classify it as a 'bug' since alloca isn't
part of the C standard :). However, as there is a precedent for how it
is handled I've adjusted Orange C to do it the same way. Now, if you
want alloca or _alloca to be supported include "malloc.h" and it will
define them as macros.
David
lionfaith wrote:
Hello!
I'm not sure about this one. But I discovered that SDL 1.2.12, in
SDL_stdinc.h, tests the presence of alloca function with |#if
defined(HAVE_ALLOCA) && !defined(alloca)| as if alloca were a macro.
But it doesn't work with occ which doesn't see it that way. I had to
hack the header to specifically manage OrangeC case. I'm not sure if
it is really a bug though.—
Reply to this email directly or view it on GitHub
#9.
from orangec.
As I can read it in SDL_stdinc.h, it is the way msvc, borland and watcom does it. (but Gnu has __builtin_alloca
, digital mars puts alloca in stdlib.h, AIX asks for a #pragma alloca
and MRC asks for declaration void *alloca (unsigned);
). Too bad it is not standardised, at least with a standardised way of knowing if alloca is there and how to "activate" it.
Thanks for your work!
from orangec.
you're welcome. mingw/gnu actually has alloca defined as macros in malloc.h, they reference the __builtin_alloca function. I chose to do it the same way :)
from orangec.
Related Issues (20)
- Windows API headers? HOT 10
- Legal issues if we take and use Pelles C's Windows API headers? HOT 5
- Add OMake makefile for Clang/MinGW HOT 4
- Build failed with MSYS2's CLANG64 HOT 3
- Build failed with MSYS2's MINGW64 HOT 15
- Please have a look at occ.mak HOT 2
- How to configure BCC102 to be used to build OrangeC? HOT 10
- mingw64.mak Why are you building .cpp source with CC=x86_64-w64-mingw32-gcc? HOT 2
- Remove support for BCC32 and RADSTUDIO HOT 1
- Does OrangeC support UCRT? HOT 1
- Repeated instructions HOT 9
- Fix occil tests
- occparse access violation HOT 8
- #pragma comment HOT 9
- broken make file
- omake crashes HOT 1
- Compile FOX Toolkit HOT 2
- Compile Gravity HOT 4
- code produced by BCX Basic to C/C++ translator will not compile HOT 1
- the runtime library does not work on Windows XP, because of the use of GetLargePageMinimum HOT 1
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 orangec.