Hi,

> Georg-Johann Lay wrote:
> IMO most important is that it doesn't break C++ code that doesn't
> use ASes. Issues with the AS feature (like name mangling) can be
> adjusted once the basic patch is upstream. For example, there
> should be a means to reject code that writes to an avr AS after
> load time, like
> 
> int compute_x ();
> const __flash int x = compute_x ();
>
> Such code isn't possible in C (when compute_x () is not
> computable at load time), but C++ allows it.

Using the same mangling scheme as llvm does is clearly not a problem, and 
pretty easy to
change. However, it would imply that the address spaces numbers are the same on 
both
GCC and LLVM, so those numbers should probably be documented somewhere.

I am not exactly sure what you mean here. Sure in C++, there are some 
initializations which take
place before main, and the same can be done in C with 
__attribute__(constructor) for example.
But what do you mean, write to an address space after load time? How do you do 
that in C, where
there is no concept of load-time/pre-main initialization. Would you happen to 
know how avr on
llvm address such problems?

Paul

  

Reply via email to