Skip to content

Cannot add pragma to function declared in struct #762

Answered by jmalak
negge asked this question in Q&A
Discussion options

You must be logged in to vote

I think you have to distinguish between a function definition / declaration and a function pointer.
you specify a pragma for the variable that contains the function pointer, so it does not work as expected.
The pragma must be defined for the function itself.

If you change your code as

#include <stdint.h>

typedef struct VBE_mode_info VBE_mode_info;

typedef void far win_func(int p);
#pragma aux win_func parm [dx]

struct VBE_mode_info {
  uint16_t mode_attributes;       /* mode attributes */
  uint8_t window_a_attributes;    /* window A attributes */
  uint8_t window_b_attributes;    /* window B attributes */
  uint16_t window_granularity;    /* window granularity kB */
  uint16_t window_…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jmalak
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #761 on November 23, 2021 17:15.