no_mangle compiler warnings #115

Closed
opened 2020-11-06 12:20:35 +08:00 by sb10q · 2 comments
warning: attribute should be applied to a function or static
  --> runtime/src/kernel/core1.rs:32:5
   |
32 |     #[no_mangle]
   |     ^^^^^^^^^^^^
33 |     static __text_start: u32;
   |     ------------------------- not a function or static
   |
   = note: `#[warn(unused_attributes)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

warning: attribute should be applied to a function or static
  --> runtime/src/kernel/core1.rs:34:5
   |
34 |     #[no_mangle]
   |     ^^^^^^^^^^^^
35 |     static __text_end: u32;
   |     ----------------------- not a function or static
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

warning: attribute should be applied to a function or static
  --> runtime/src/kernel/core1.rs:36:5
   |
36 |     #[no_mangle]
   |     ^^^^^^^^^^^^
37 |     static __exidx_start: u32;
   |     -------------------------- not a function or static
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

warning: attribute should be applied to a function or static
  --> runtime/src/kernel/core1.rs:38:5
   |
38 |     #[no_mangle]
   |     ^^^^^^^^^^^^
39 |     static __exidx_end: u32;
   |     ------------------------ not a function or static
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

```text warning: attribute should be applied to a function or static --> runtime/src/kernel/core1.rs:32:5 | 32 | #[no_mangle] | ^^^^^^^^^^^^ 33 | static __text_start: u32; | ------------------------- not a function or static | = note: `#[warn(unused_attributes)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static --> runtime/src/kernel/core1.rs:34:5 | 34 | #[no_mangle] | ^^^^^^^^^^^^ 35 | static __text_end: u32; | ----------------------- not a function or static | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static --> runtime/src/kernel/core1.rs:36:5 | 36 | #[no_mangle] | ^^^^^^^^^^^^ 37 | static __exidx_start: u32; | -------------------------- not a function or static | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: attribute should be applied to a function or static --> runtime/src/kernel/core1.rs:38:5 | 38 | #[no_mangle] | ^^^^^^^^^^^^ 39 | static __exidx_end: u32; | ------------------------ not a function or static | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! ```

The error message is pretty bad, as they are in fact marked static – at first glance, it isn't clear to me that this isn't a compiler bug. Perhaps the extern "C" throws it off?

The error message is pretty bad, as they are in fact marked static – at first glance, it isn't clear to me that this isn't a compiler bug. Perhaps the extern "C" throws it off?

The error message is pretty bad, as they are in fact marked static – at first glance, it isn't clear to me that this isn't a compiler bug. Perhaps the extern "C" throws it off?

Just opened an issue: https://github.com/rust-lang/rust/issues/78989

> The error message is pretty bad, as they are in fact marked static – at first glance, it isn't clear to me that this isn't a compiler bug. Perhaps the extern "C" throws it off? Just opened an issue: https://github.com/rust-lang/rust/issues/78989
sb10q closed this issue 2020-11-16 14:57:22 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#115
There is no content yet.