View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001219 | FSSCP | --------- | public | 2007-01-15 09:08 | 2007-01-22 23:41 |
| Reporter | sefi | Assigned To | Goober5000 | ||
| Priority | normal | Severity | block | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0001219: ai/aiturret.cpp:2056: error: expected unqualified-id before '||' token | ||||
| Description | You can't name a matrix "or". "or" is a keyword. Please correct it. | ||||
| Tags | No tags attached. | ||||
|
2007-01-17 00:48
|
fs2or.patch (678 bytes)
--- code/ai/aiturret.cpp~ 2007-01-15 01:37:37.000000000 +0000
+++ code/ai/aiturret.cpp 2007-01-16 23:26:18.000000000 +0000
@@ -2053,8 +2053,8 @@
if(tp->flags & MSS_FLAG_TURRET_HULL_CHECK){
polymodel *pm = model_get(shipp->modelnum);
mc_info test_collide;
- matrix or;
- vm_vector_2_matrix(&or, &v2e, NULL, NULL);
+ matrix or2;
+ vm_vector_2_matrix(&or2, &v2e, NULL, NULL);
vec3d start, end;
float r;
|
|
|
Something like the above patch? |
|
|
Umm... it's not a reserved word in C/C++. Unless you're using some sort of hybrid/extended compiler? Nevertheless, it's an easy fix, so I'll go ahead and commit your patch. I'll close this in a few days if there are no other comments. |
|
|
It is an official ANSI C++ keyword actually. This isn't a problem with GCC, it's just that in typical Microsoft fashion, they don't follow the standard. MSVC++ would have the exact same problem if it was as standards strict as GCC is. I have already fixed this several times before in the model code. I keep meaning to disable the most basic keywords (and, bitand, bitor, compl, not, or, xor) for non-Windows builds. Though technically, doing that would go against the C++ standard. Just FYI though, the full list of ANSI C++ reserved keywords is: explicit, bool, mutable, template, typeid, typename, and, or, xor, bitor, compl, bitand, and_eq, or_eq, xor_eq, not, not_eq, const_cast, dynamic_cast, reinterpret_cast, static_cast, true, false, namespace, using, throw, try, catch |
|
|
Ah, thanks. Good to know. :) Marking as fixed then. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2007-01-15 09:08 | sefi | New Issue | |
| 2007-01-17 00:48 | Srdjant | File Added: fs2or.patch | |
| 2007-01-17 00:48 | Srdjant | Note Added: 0007475 | |
| 2007-01-17 05:31 | taylor | Status | new => assigned |
| 2007-01-17 05:31 | taylor | Assigned To | => WMCoolmon |
| 2007-01-17 05:31 | taylor | Assigned To | WMCoolmon => Bobboau |
| 2007-01-22 21:33 | Goober5000 | Note Added: 0007520 | |
| 2007-01-22 21:39 | Goober5000 | Note Edited: 0007520 | |
| 2007-01-22 22:47 | taylor | Note Added: 0007524 | |
| 2007-01-22 23:41 | Goober5000 | Note Added: 0007527 | |
| 2007-01-22 23:41 | Goober5000 | Assigned To | Bobboau => Goober5000 |
| 2007-01-22 23:41 | Goober5000 | Status | assigned => resolved |
| 2007-01-22 23:41 | Goober5000 | Resolution | open => fixed |