Error pasting and does not give a valid preprocessing token

PreWord iam not a Programmer just using Marlin for my 3d Printer This Issue only appears when I try to compile it with 1.8.6 by 1.8.4 everything is fine i hope someone can identify the "Real B...

PreWord iam not a Programmer just using Marlin for my 3d Printer
This Issue only appears when I try to compile it with 1.8.6 by 1.8.4 everything is fine i hope someone can identify the «Real Bug» here
*Bug report
Marlin Software.zip

Arduino: 1.8.6 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketchMarlinConfig.h:26:0,

                 from sketchMarlin.h:36,

                 from sketchMarlin_main.cpp:247:

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_DDR" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:95:36: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                    ^

sketchfastio.h:113:30: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:95:61: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                                             ^

sketchfastio.h:113:30: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_RPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:90:41: note: in definition of macro '_WRITE'

 #define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)

                                         ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:79:51: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } 

                                                   ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:79:78: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } 

                                                                              ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:84:51: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } 

                                                   ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:84:79: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } 

                                                                               ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

In file included from sketchMarlinConfig.h:26:0,

                 from sketchMarlin.h:36,

                 from sketchMarlin_main.cpp:247:

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:48: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:75: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                                           ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:104: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                                                                        ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

In file included from sketchMarlinConfig.h:26:0,

                 from sketchMarlin.h:36,

                 from sketchMarlin_main.cpp:247:

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:132: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                                                                                                    ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:914:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketchMarlin_main.cpp:914:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_DDR" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:95:36: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                    ^

sketchfastio.h:113:30: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:95:61: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                                             ^

sketchfastio.h:113:30: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_RPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:90:41: note: in definition of macro '_WRITE'

 #define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)

                                         ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:79:51: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } 

                                                   ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:79:78: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } 

                                                                              ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:84:51: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } 

                                                   ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:84:79: note: in definition of macro '_WRITE_C'

                                          {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); } 

                                                                               ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

In file included from sketchMarlinConfig.h:26:0,

                 from sketchMarlin.h:36,

                 from sketchMarlin_main.cpp:247:

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:48: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:75: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                                           ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:104: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                                                                        ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

In file included from sketchMarlinConfig.h:26:0,

                 from sketchMarlin.h:36,

                 from sketchMarlin_main.cpp:247:

pins_GT2560_REV_A.h:93:32: error: pasting "/* Must be enabled at startup to keep power flowing*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54  // Must be enabled at startup to keep power flowing

                                ^

sketchfastio.h:75:132: note: in definition of macro '_WRITE_NC'

 #define _WRITE_NC(IO, v)  do { if (v) {DIO ##  IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)

                                                                                                                                    ^

sketchfastio.h:102:21: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V) _WRITE(IO,V)

                     ^

sketchfastio.h:113:46: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO, v) do{ SET_OUTPUT(IO); WRITE(IO, v); }while(0)

                                              ^

sketchMarlin_main.cpp:927:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketchMarlin_main.cpp:927:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

exit status 1
pasting "/* Must be enabled at startup to keep power flowing*/" and "_DDR" does not give a valid preprocessing token

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Bug 35610
Pasting «foo» and «(» does not give a valid preprocessing token

Summary:

Pasting «foo» and «(» does not give a valid preprocessing token

Status: RESOLVED
INVALID

Alias:

None

Product:

gcc

Classification:

Unclassified

Component:

preprocessor

(show other bugs)

Version:

4.3.0

Importance:

P3
normal

Target Milestone:

Assignee:

Not yet assigned to anyone

URL:


Keywords:

Depends on:


Blocks:


Reported: 2008-03-16 22:44 UTC by Andrey
Modified: 2008-03-16 23:06 UTC
(History)

CC List:

1
user

(show)

See Also:

Host:

i686-pc-cygwin

Target:

Build:

Known to work:

Known to fail:

Last reconfirmed:


Attachments
Add an attachment
(proposed patch, testcase, etc.)

Note
You need to
log in
before you can comment on or make changes to this bug.


Post


Essentials Only

Full Version

funbotix

Starting Member

  • Total Posts : 57
  • Reward points : 0
  • Joined: 2010/02/18 14:53:57
  • Location: San Antonio, Texas
  • Status: offline



2010/03/24 07:18:41

(permalink)

0

I’ve used the below code in other (non PIC) projects successfully, but not with my current PIC24 project.

#define BLACK    «0»
#define RED      «1»
#define GREEN    «2»
#define YELLOW   «3»
#define BLUE     «4»
#define MAGENTA  «5»
#define CYAN     «6»
#define WHITE    «7»

 
#define COLORS(foreground,background) «x1B[3» ## foreground ## «;4» ## background ## «m»

  When I have code like this in my project, the C30 compiler complains as shown below.

char string[40];
strcpy(string,COLORS(RED,YELLOW));

main.c:236:1: error: pasting «»x1B[3″» and «RED» does not give a valid preprocessing token
main.c:236:1: error: pasting «RED» and «»;4″» does not give a valid preprocessing token
main.c:236:1: error: pasting «»;4″» and «YELLOW» does not give a valid preprocessing token
main.c:236:1: error: pasting «YELLOW» and «»m»» does not give a valid preprocessing token


But when I have code like this in my project, the C30 compiler does not complain, and, the code produces the desired result when run.


char string[40];
strcpy(string,»x1B[3″ RED «;4» YELLOW «m»);

Can anyone tell me why this is?  It seems to me like C30 is not properly supporting the ## preprocessor operator.  I think I found a bug in the C30 compiler.
 
Dave.

#1

cawilkie

Administrator

  • Total Posts : 2010
  • Reward points : 0
  • Joined: 2003/11/07 12:49:11
  • Status: offline

RE: ## preprocessor operator


2010/03/24 08:17:51

(permalink)

+1 (1)

What you see is correct behaviour.

The pre-processor will concatenate strings to form one string, so: «foo» «bar» «baz» is equivalent to «foobarbaz».

Also, the ## operator can only be used to form a valid preprocessing token, as validated by the standard (for C89 it is) 3.8.3.3, ## operator


… If the result is not a valid preprocessing token, the behaviour is undefined …

GCC chooses to report this as an error. ## can only be used to form one new token.

Typically a JOIN is defined as:

#define JOIN2(A,B) A ## B
#define JOIN(A,B) JOIN2(A,B)

Which allows for macros to be expanded, and then joined.

Regards
Calum

post edited by cawilkie — 2010/03/24 08:49:05

#2

zardoz1

Super Member

  • Total Posts : 1852
  • Reward points : 0
  • Joined: 2005/07/09 08:03:28
  • Location: ‘s-Hertogenbosch, The Netherlands
  • Status: offline

RE: ## preprocessor operator


2010/03/24 08:34:00

(permalink)

+1 (1)

I dont think this is a problem in C30 but in the other compiler you are using.

The error the compiler generates is correct.

The macro

#define COLORS(foreground,background) "x1B[3" ## foreground ## ";4" ## background ## "m" 

Used like:

COLORS(RED,YELLOW)

Will indeed fill in the value RED and YELLOW and not process this further. To solve this you must not use the concateniting operator ## but the tokenizing operator. So redefine your macro like:

#define COLORS(foreground,background) "x1B[3"#foreground";4"#background"m" 

This will lead to all strings being concatenated.

But this is still not what you want, you want the symbols RED and YELLOW to be resolved to their values. For this you need the reparsing feature of the C preprocessor.

So what you need is the following:

#define REPARSE(a)    #a
#define COLORS(foreground,background) "x1B[3"REPARSE(foreground)";4"REPARSE(background)"m"

This macro will result in a concatenated string where for RED and YELLOW the respective numeric values are filled in.

Good luck and don’t doubt the capabilities of C30 but have a look at your other compiler.


AVIX
the PIC32 & dsPIC/PIC24 RTOS with:
— Zero Latency Interrupts
— The best performance!
— Integrated Power Management
Download here: http://www.avix-rt.com/

#3

crwilliams

Super Member

  • Total Posts : 1663
  • Reward points : 0
  • Joined: 2005/06/24 07:56:24
  • Location: From UK now in PA
  • Status: offline

RE: ## preprocessor operator


2010/03/24 08:45:59

(permalink)

0

The responses are correct. If you have K&R 2nd Ed, see section A12 and in particularA12.3 which exactly matches cawilkie’s reply.

#4

zardoz1

Super Member

  • Total Posts : 1852
  • Reward points : 0
  • Joined: 2005/07/09 08:03:28
  • Location: ‘s-Hertogenbosch, The Netherlands
  • Status: offline

RE: ## preprocessor operator


2010/03/24 09:52:28

(permalink)

0

And one more thing,

In my reparse macro I used the tokenizing operator #. Strictly spoken this is not required since your basic macro’s, BLACK, RED, ….. are already defined as a string. When using the tokenizing operator in my reparse macro, you don’t need to do this. So i.s.o. #define BLACK «0» you can use #define BLACK 0.

The advantage might by that this also allows you to use the defines for the basic colors as numeric values in your code.

Success

Leon (aka zardoz1)


AVIX
the PIC32 & dsPIC/PIC24 RTOS with:
— Zero Latency Interrupts
— The best performance!
— Integrated Power Management
Download here: http://www.avix-rt.com/

#5

funbotix

Starting Member

  • Total Posts : 57
  • Reward points : 0
  • Joined: 2010/02/18 14:53:57
  • Location: San Antonio, Texas
  • Status: offline

RE: ## preprocessor operator


2010/03/24 10:05:06

(permalink)

0

Wow… thanks for all the super-fast and illuminating responses!

  I try to learn something new every day, and it looks like today is my lucky day!  There’s lot’s of intersting stuff in the responses.

  Every time I think I’ve got a pretty good handle on macros I learn something new.

  Dave

#6

zardoz1

Super Member

  • Total Posts : 1852
  • Reward points : 0
  • Joined: 2005/07/09 08:03:28
  • Location: ‘s-Hertogenbosch, The Netherlands
  • Status: offline

RE: ## preprocessor operator


2010/03/24 12:58:34

(permalink)

0

The fast response is also caused by the fact that I have a special relation with the preprocessor.

Lot’s of people hat it and many many coding standard used in large companies forbid it to be used. Over here in the Netherlands I know of at least one very big international company that uses these rules.

I think a lot of this is caused by the fact that the preprocessor is misunderstood. Many people know about the pitfalls. A very well known example is the MAX macro.

You probably know this,

#define MAX(a,b) (a)>(b)?(a):(b)

When using this macro like:

m = MAX(i++, j++);

either the i++ or the j++ parameter is evaluated twice.

And indeed, this is a place where macro’s have an undesired side effect. My opinion is also that using macro’s like these should be banned. But in general, macro’s can be used for many purposes. The purpose you are using it for is great. This I call more the configuration purpose as compared to the algorithm purpose but that’s just a naming convention I use.

By the way, the MAX macro has no place when the compiler supports inline functions which generate the same effcient code without the side effect.


AVIX
the PIC32 & dsPIC/PIC24 RTOS with:
— Zero Latency Interrupts
— The best performance!
— Integrated Power Management
Download here: http://www.avix-rt.com/

#7

Понравилась статья? Поделить с друзьями:
  • Error passphrase chosen is below the length requirements of the usm min 8
  • Error passing const as this argument discards qualifiers
  • Error partition table is empty
  • Error parsing xml unbound prefix error
  • Error parsing uri scheme must be mongodb or mongodb srv