1

GNU C++ struct _attribute_ packed...compile error

view story
linux-howto

http://ubuntuforums.org – I'm having difficulty correcting the following compile error. Any help would be appreciated. Source..... #include <stdio.h> #include <stdlib.h> #include <stdint.h> using namespace std; struct strA { char a; int b; } _attribute_ ((packed,aligned (8))); int main(int argc, char **argv) { int mainrc=0; return mainrc; } Compiler....... g++ --version g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. ERROR......... g++ -std=c++11 /home/arcdeveloper/csrc/structatt.c++ /home/arcdeveloper/csrc/structatt.c++:9:17: error: ‘packed’ wa (Hardware)