This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Compilation errors with gcc4.9 and c++1y
- From: madana gopal <madanagopal123 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 31 Jul 2016 20:09:42 +0530
- Subject: Compilation errors with gcc4.9 and c++1y
- Authentication-results: sourceware.org; auth=none
Hi,
I am compiling below code with c++1y flag with gcc 4.9.
#include <stdio.h>
register unsigned long sp asm ("sp");
int main()
{
printf("[%d] \n",((unsigned long)(sp) >= 5));
return 0;
}
I got the error as "Expected address of explicit register variable
sp". Here, the error is coming from the expression (sp). But it is not
coming when i use gcc4.9 without c++1y flag.
gcc4.9 is mandatory to be used in my project. Please let me know, what
is resolution for this ( any flags) or the reason for this in c++1y.
Regards,
Madan