English 中文(简体)
采用正文法(g++)
原标题:Unbalanced parenthesis using __attribute__ in g++

今天,我尝试了一个我一段时间前制定的项目。 当我遇到汇编错误时,我被ris笑,因为我成功地利用了G++汇编了我的项目。

该短刀切照搬了遇到错误的行文:

int main() {
    __attribute__((aligned(16)) char arr[5];
}

产生这一错误:

test.cpp:2:32: error: expected  ) 
    __attribute__((aligned(16)) char arr[5];
                               ^
                               )

如你所看到的那样,存在一种双向的母体。 有三个(和两个)。 这显然认为它实际上会产生汇编错误。

这是对这一关键词的有效使用吗? 在http://www.unixwiz.net/techtips/gnu-c-attributes.html“rel=“nofollow noreferer”上,文件表明了这一点。

I m using g++ 4.5.2 and clang 2.8.

请注意,在使用gcc而不是g++时发现这一错误。

最佳回答

这将是一个汇编者。 编辑见attribute__。 随后是两张开张的母子,有些是其他的子体,然后是两张封闭的母体,这或许是“界定”<代码>_attribute_<>/code>。 比如,应该这样看待。

∗∗∗∗∗

我的猜测是,两者之间的表象被解读为<条码>(16)和一些仍在运行的圆形。

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签