简体   繁体   English

#pragma alloca 是什么意思

[英]What does #pragma alloca means

The below is a code segment from the GNU Make software.These lines are taken from make.h.Can you please tell me what does #pragma alloca means.Does #if define (_AIX) means that the code #pragma alloca should run only of AIX is defined.下面是来自 GNU Make 软件的代码段。这些行取自 make.h。你能告诉我#pragma alloca 是什么意思吗。#if define (_AIX) 表示代码#pragma alloca 应该只运行AIX 的定义。 The version of make is 3.75 make的版本是3.75

/* AIX requires this to be the first thing in the file.  */

#if defined (_AIX) && !defined (__GNUC__)
 #pragma alloca
#endif

Please give me a detailed explanation.I am trying to read and learn GNU make.Where can can i find a detailed article of how GNU make works internally.请给我一个详细的解释。我正在尝试阅读和学习 GNU make。我在哪里可以找到关于 GNU make 如何在内部工作的详细文章。

#Extra #额外的

It would be helpful if you can point me on how to read codes (of any opensource software) and learn.Its seems really a tough task to learn from code.Any help would be highly appreciated.如果您能指出我如何阅读(任何开源软件的)代码并学习,那将很有帮助。从代码中学习似乎真的是一项艰巨的任务。任何帮助将不胜感激。

Can you please tell me what does #pragma alloca means你能告诉我#pragma alloca是什么意思吗

It (apparently, I just googled aix pragma alloca ) means that on AIX systems, the system C compiler will provide alloca() .它(显然,我刚刚搜索了aix pragma alloca意味着在 AIX 系统上,系统 C 编译器将提供alloca()

Does #if define (_AIX) means that the code #pragma alloca should run only of AIX is defined? #if define (_AIX)是否意味着代码#pragma alloca应该只运行 AIX 被定义?

Yes, it does.是的,它确实。 If the _AIX preprocessor symbol is set, and the __GNUC__ symbol isn't, then the code is run.如果设置了_AIX预处理器符号,而没有设置__GNUC__符号,则运行代码。

__GNUC__ would be set when using GCC, and #pragma alloca isn't a thing on GCC. __GNUC__将在使用 GCC 时设置,而#pragma alloca在 GCC 上不存在。

I am trying to read and learn GNU make.Where can can i find a detailed article of how GNU make works internally.我正在尝试阅读和学习 GNU make。在哪里可以找到关于 GNU make 如何在内部工作的详细文章。 It would be helpful if you can point me on how to read codes (of any opensource software) and learn.Its seems really a tough task to learn from code.Any help would be highly appreciated.如果您能指出我如何阅读(任何开源软件的)代码并学习,那将很有帮助。从代码中学习似乎真的是一项艰巨的任务。任何帮助将不胜感激。

You will want to choose a simpler program than Make to start with.您将需要选择一个比 Make 更简单的程序。 How about busybox's implementation of ls ?busybox 的ls实现怎么样?

In general, though, you'll probably want to learn how to skim programs – for instance, these three AIX-related lines are just a small detail and you're getting caught up in the weeds, so to speak.不过,一般来说,您可能想学习如何浏览程序——例如,这三个与 AIX 相关的行只是一个小细节,可以这么说,您会陷入困境。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM