]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Add --enable-compressed-debug-sections={all,gas,gold,ld}
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
d9a6bd32
JJ
12015-10-13 Jakub Jelinek <jakub@redhat.com>
2 Aldy Hernandez <aldyh@redhat.com>
3
4 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6 (c_parser_omp_variable_list): Handle structure elements for
7 map, to and from clauses. Handle array sections in reduction
8 clause. Formatting fixes.
9 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
10 if clause modifiers.
11 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
12 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
13 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
14 c_parser_omp_clause_is_device_ptr): New functions.
15 (c_parser_omp_clause_ordered): Parse optional parameter.
16 (c_parser_omp_clause_reduction): Handle array reductions.
17 (c_parser_omp_clause_schedule): Parse optional simd modifier.
18 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
19 functions.
20 (c_parser_omp_clause_linear): Parse linear clause modifiers.
21 (c_parser_omp_clause_depend_sink): New function.
22 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
23 (c_parser_omp_clause_map): Parse release/delete map kinds and
24 optional always modifier.
25 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
26 and c_finish_omp_clauses callers.
27 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
28 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
29 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
30 (OMP_CRITICAL_CLAUSE_MASK): Define.
31 (c_parser_omp_critical): Parse critical clauses.
32 (c_parser_omp_for_loop): Handle doacross loops, adjust
33 c_finish_omp_for and c_finish_omp_clauses callers.
34 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
35 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
36 (OMP_FOR_CLAUSE_MASK): Add linear clause.
37 (c_parser_omp_for): Disallow ordered clause when combined with
38 distribute. Disallow linear clause when combined with distribute
39 and not combined with simd.
40 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
41 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
42 parse clauses and if depend clause is found, don't parse a body.
43 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
44 Allow target parallel without for after it.
45 (OMP_TASK_CLAUSE_MASK): Add priority clause.
46 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
47 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
48 invalid kinds.
49 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
50 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
51 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
52 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
53 functions.
54 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
55 defaultmap and is_device_ptr clauses.
56 (c_parser_omp_target): Parse target parallel and target simd. Set
57 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
58 and target exit data. Diagnose invalid map kinds.
59 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
60 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
61 construct.
62 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
63 &omp_priv.
64 (OMP_TASKLOOP_CLAUSE_MASK): Define.
65 (c_parser_omp_taskloop): New function.
66 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
67 handle PRAGMA_OMP_TASKLOOP.
68 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
69 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
70 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
71 Add IS_OMP argument, handle structure element bases, diagnose
72 bitfields, pass IS_OMP recursively, diagnose known zero length
73 array sections in depend clauses, handle array sections in reduction
74 clause, diagnose negative length even for pointers.
75 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
76 types, pass IS_OMP down to handle_omp_array_sections_1, handle
77 array sections in reduction clause, set
78 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
79 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
80 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
81 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
82
21ba0cea
MP
832015-10-06 Marek Polacek <polacek@redhat.com>
84
85 * c-parser.c (c_parser_statement_after_labels): Use
86 protected_set_expr_location.
87 (c_parser_omp_clause_num_gangs): Likewise.
88 (c_parser_omp_clause_num_threads): Likewise.
89 (c_parser_omp_clause_num_workers): Likewise.
90 (c_parser_omp_clause_vector_length): Likewise.
91 (c_parser_omp_clause_num_teams): Likewise.
92 (c_parser_omp_clause_thread_limit): Likewise.
93 * c-typeck.c (build_c_cast): Likewise.
94 (c_cast_expr): Likewise.
95
624d31fe
RS
962015-10-05 Richard Sandiford <richard.sandiford@arm.com>
97
98 * c-typeck.c (c_tree_equal): Use real_equal instead of
99 REAL_VALUES_EQUAL.
100
b8fd7909
JM
1012015-10-04 Jason Merrill <jason@redhat.com>
102
103 * c-parser.c (c_lex_one_token): Handle @synchronized.
104 * c-decl.c (match_builtin_function_types): A declaration of a built-in
105 can change whether the function is transaction_safe.
106
1c7485af
MP
1072015-10-02 Marek Polacek <polacek@redhat.com>
108
109 PR c/67730
110 * c-typeck.c (convert_for_assignment): Use the expansion point
111 location throughout.
112
3e3b8d63
MP
1132015-10-02 Marek Polacek <polacek@redhat.com>
114
115 PR c/64249
116 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
117 and pass it down to c_parser_if_statement.
118 (c_parser_else_body): Add CHAIN parameter and pass it down to
119 c_parser_statement_after_labels.
120 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
121 duplicated if-else-if conditions.
122
aabef2de
MP
1232015-10-01 Marek Polacek <polacek@redhat.com>
124
125 * c-typeck.c (convert_for_assignment): Improve commentary.
126
de8ddd5f
MP
1272015-09-30 Marek Polacek <polacek@redhat.com>
128
129 PR c/67730
130 * c-typeck.c (c_finish_return): Use the expansion point location for
131 certain "return with value" warnings.
132
c4914de6
MLI
1332015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
134
135 * c-parser.c (pragma_lex): Add loc argument.
136
0e36f5c7
MP
1372015-09-15 Marek Polacek <polacek@redhat.com>
138
139 PR c/67580
140 * c-decl.c (tag_exists_p): New function.
141 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
142 struct/union/enum keywords are missing.
143 * c-tree.h (tag_exists_p): Declare.
144
2f3bb934
MP
1452015-09-15 Marek Polacek <polacek@redhat.com>
146
147 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
148 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
149 Return NULL_TREE instead of 0.
150 (lookup_name): Return NULL_TREE instead of 0.
151 (lookup_name_in_scope): Likewise.
152 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
153 (parser_xref_tag): Use false instead of 0.
154 (start_struct): Use true instead of 1.
155 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
156
aa256c4a
MP
1572015-09-14 Marek Polacek <polacek@redhat.com>
158
159 * c-typeck.c (set_nonincremental_init_from_string): Use
160 HOST_WIDE_INT_M1U when shifting a negative value.
161
dbb68221
MW
1622015-09-09 Mark Wielaard <mjw@redhat.com>
163
164 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
165 parm against NULL.
166
a8a098ac
JJ
1672015-09-10 Jakub Jelinek <jakub@redhat.com>
168
169 PR c/67502
170 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
171 into OMP_FOR_PRE_BODY rather than before the loop.
172
f4b189d5
JJ
1732015-09-09 Jakub Jelinek <jakub@redhat.com>
174
0bb99c11
JJ
175 PR c/67501
176 * c-parser.c (c_parser_oacc_all_clauses,
177 c_parser_omp_all_clauses): Remove invalid clause from
178 list of clauses even if parser->error is set.
179
fce5e5e3
JJ
180 PR c/67500
181 * c-parser.c (c_parser_omp_clause_aligned,
182 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
183 test for errors.
184 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
185 error_mark_node.
186
f4b189d5
JJ
187 PR c/67495
188 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
189 instead of c_parser_unary_expression. If the result is !lvalue_p,
190 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
191
b2aaf235
MP
1922015-09-04 Marek Polacek <polacek@redhat.com>
193
194 PR sanitizer/67279
195 * c-typeck.c (build_binary_op): Don't instrument static initializers.
196
1807ffc1
MS
1972015-09-03 Martin Sebor <msebor@redhat.com>
198
199 PR c/66516
8b652e65
JJ
200 * c-typeck.c (convert_arguments, parser_build_unary_op,
201 build_conditional_expr, c_cast_expr, convert_for_assignment,
202 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
203 reject_gcc_builtin.
204 (c_decl_implicit): Define.
205
d04ff417
MP
2062015-09-02 Marek Polacek <polacek@redhat.com>
207
208 PR c/67432
209 * c-parser.c (c_parser_enum_specifier): Give a better error for
210 an empty enum.
211
a79683d5
TS
2122015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
213
214 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
215
191a6b94
MP
2162015-08-12 Marek Polacek <polacek@redhat.com>
217
218 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
219 LOC to it.
220
420a9d9b
MP
2212015-08-03 Marek Polacek <polacek@redhat.com>
222
223 PR c/67088
224 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
225 Use it.
226 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
227
992118a1
PP
2282015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
229
230 * c-parser.c (c_parser_if_body): Take token_indent_info
231 argument. Call warn_for_misleading_indentation even when the
232 body is a semicolon. Extract token_indent_infos corresponding
233 to the guard, body and next tokens. Adjust call to
234 warn_for_misleading_indentation accordingly.
235 (c_parser_else_body): Likewise.
236 (c_parser_if_statement): Likewise.
237 (c_parser_while_statement): Likewise.
238 (c_parser_for_statement): Likewise.
239
46308474
LFSM
2402015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
241 Manuel López-Ibáñez <manu@gcc.gnu.org>
242
243 * c-decl.c (get_parm_info): Remove static var. Update warning
244 message.
245
05b28fd6
MP
2462015-07-27 Marek Polacek <polacek@redhat.com>
247
248 PR c++/66555
249 PR c/54979
250 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
251
451b5e48
MP
2522015-07-20 Marek Polacek <polacek@redhat.com>
253
254 PR c++/55095
255 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
256 (build_binary_op): Warn about left shift overflows.
257
1916bcb5
AM
2582015-07-09 Andrew MacLeod <amacleod@redhat.com>
259
260 * c-array-notation.c: Adjust includes for flags.h changes.
261 * c-objc-common.c: Likewise.
262
c7131fb2
AM
2632015-07-07 Andrew MacLeod <amacleod@redhat.com>
264
265 * c-array-notation.c: Adjust includes.
266 * c-aux-info.c: Likewise.
267 * c-convert.c: Likewise.
268 * c-decl.c: Likewise.
269 * c-errors.c: Likewise.
270 * c-lang.c: Likewise.
271 * c-objc-common.c: Likewise.
272 * c-parser.c: Likewise.
273 * c-typeck.c: Likewise.
274
da2e71c9
MLI
2752015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
276
277 PR fortran/66605
278 * c-decl.c (finish_function): Call do_warn_unused_parameter.
279
b155cfd9
MP
2802015-06-29 Marek Polacek <polacek@redhat.com>
281
282 PR c/66322
283 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
284 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
285 about -Wswitch-bool here.
286 (do_case): Update c_add_case_label call.
287 (c_finish_case): Update c_do_switch_warnings call.
288
31521951
MP
2892015-06-27 Marek Polacek <polacek@redhat.com>
290
291 * c-typeck.c: Use VECTOR_TYPE_P throughout.
292
22d03525
MP
2932015-06-26 Marek Polacek <polacek@redhat.com>
294
295 * c-array-notation.c (fix_builtin_array_notation_fn): Use
296 INDIRECT_REF_P.
297 * c-typeck.c (array_to_pointer_conversion): Likewise.
298 (build_unary_op): Likewise.
299 (c_finish_return): Likewise.
300
f0889939
AM
3012015-06-25 Andrew MacLeod <amacleod@redhat.com>
302
303 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
304 * c-parser.c: Likewise.
305
8d67ee55
RS
3062015-06-25 Richard Sandiford <richard.sandiford@arm.com>
307
308 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
309 instead of pointer_hash.
310 (detect_field_duplicates): Likewise.
311
0ae9bd27
MP
3122015-06-25 Marek Polacek <polacek@redhat.com>
313
314 * c-array-notation.c: Use VAR_P throughout.
315 * c-decl.c: Likewise.
316 * c-objc-common.c: Likewise.
317 * c-parser.c: Likewise.
318 * c-typeck.c: Likewise.
319
62f9079a
MP
3202015-06-25 Marek Polacek <polacek@redhat.com>
321
322 * c-decl.c: Use is_global_var throughout.
323 * c-parser.c: Likewise.
324 * c-typeck.c: Likewise.
325
abb226c9
AM
3262015-06-17 Andrew MacLeod <amacleod@redhat.com>
327
328 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
329 * c-aux-info.c: Likewise.
330 * c-convert.c: Likewise.
331 * c-decl.c: Likewise.
332 * c-errors.c: Likewise.
333 * c-lang.c: Likewise.
334 * c-objc-common.c: Likewise.
335 * c-parser.c: Likewise.
336 * c-typeck.c: Likewise.
337
8cbababc
JH
3382015-06-11 Jan Hubicka <hubicka@ucw.cz>
339
340 PR middle-end/66325
341 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
342 variants.
343
a0349665
PMR
3442015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
345
346 * c-decl.c (pop_scope): Register the main translation unit
347 through the new debug hook.
348
13fdf2e2
AM
3492015-06-08 Andrew MacLeod <amacleod@redhat.com>
350
351 * c-array-notation.c : Adjust include files.
352 * c-aux-info.c : Likewise.
353 * c-convert.c : Likewise.
354 * c-decl.c : Likewise.
355 * c-errors.c : Likewise.
356 * c-lang.c : Likewise.
357 * c-lang.h : Likewise.
358 * c-objc-common.c : Likewise.
359 * c-parser.c : Likewise.
360 * c-typeck.c : Likewise.
361
d7438551
AH
3622015-06-05 Aldy Hernandez <aldyh@redhat.com>
363
364 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
365 immediately clobber it.
366 (c_write_global_declarations_1): Remove call to
367 check_global_declaration_1.
368 (c_write_global_declarations_2): Remove.
369 (c_write_final_cleanups): Rename from c_write_global_declarations.
370 Remove call to finalize_compilation_unit.
371 Remove calls to debugging hooks.
372 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
373 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
374 * c-tree.h: Remove c_write_global_declarations.
375
ecb9f223
AM
3762015-06-04 Andrew MacLeod <amacleod@redhat.com>
377
378 * c-array-notation.c: Adjust includes for restructured coretypes.h.
379 * c-aux-info.c: Likewise.
380 * c-convert.c: Likewise.
381 * c-decl.c: Likewise.
382 * c-errors.c: Likewise.
383 * c-lang.c: Likewise.
384 * c-objc-common.c: Likewise.
385 * c-parser.c: Likewise.
386 * c-typeck.c: Likewise.
387
9482b620
MP
3882015-06-04 Marek Polacek <polacek@redhat.com>
389
390 PR c/66341
391 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
392 it is a lvalue.
393
bc51ace3
PK
3942015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
395
396 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
397 Warn for empty struct.
398 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
399
ea5b45b6
AT
4002015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
401
402 * c-decl.c (start_function): Call plugin before parsing.
403 (finish_function): Call plugin after parsing.
404
c2d47482
PK
4052015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
406
407 PR c/49551
408 * c-decl.c (merge_decls): Merge DECL_COMMON.
409
a95492ab
JW
4102015-05-22 Jim Wilson <jim.wilson@linaro.org>
411
412 * Make-lang.in (check_gcc_pallelize): Define.
413
fd5c817a
MP
4142015-05-22 Marek Polacek <polacek@redhat.com>
415
416 PR c/47043
417 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
418 attributes.
419
c7b70a3c
MP
4202015-05-21 Marek Polacek <polacek@redhat.com>
421
422 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
423 DECL_BUILT_IN.
424
21b634ae
MP
4252015-05-20 Marek Polacek <polacek@redhat.com>
426
427 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
428 * c-typeck.c: Likewise.
429
296a8c2f
MP
4302015-05-19 Marek Polacek <polacek@redhat.com>
431
432 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
433
41b37d5e
JJ
4342015-05-19 Jakub Jelinek <jakub@redhat.com>
435
436 PR middle-end/66199
437 * c-parser.c (c_parser_omp_for_loop): Don't add
438 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
439 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
440 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
441 constructs.
442
fab27f52
MM
4432015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
444
445 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 446 swaps.
fab27f52 447
40de31cf
MLI
4482015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
449
450 PR fortran/44054
451 * c-objc-common.c (c_tree_printer): Replace locus pointer with
452 accessor function.
453
3aa3c9fc
MP
4542015-05-14 Marek Polacek <polacek@redhat.com>
455
456 PR c/66066
457 PR c/66127
458 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
459 rather than with 0.
460
c3388e62
DM
4612015-05-12 David Malcolm <dmalcolm@redhat.com>
462
463 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
464 to add a call to warn_for_misleading_indentation.
465 (c_parser_else_body): Likewise, adding param "else_loc".
466 (c_parser_if_statement): Check for misleading indentation.
467 (c_parser_while_statement): Likewise.
468 (c_parser_for_statement): Likewise.
469
755e528f
MP
4702015-05-08 Marek Polacek <polacek@redhat.com>
471
472 PR c/64918
473 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
474 (output_init_element): Likewise.
475
0173bd2a
MP
4762015-05-07 Marek Polacek <polacek@redhat.com>
477
478 PR c/65179
479 * c-typeck.c (build_binary_op): Warn when left shifting a negative
480 value.
481
9babc352
MP
4822015-04-30 Marek Polacek <polacek@redhat.com>
483
484 * c-typeck.c (set_init_label): Call error_at instead of error and
485 pass LOC to it.
486
ac9f18db
MP
487 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
488 the type of a decl.
489
ec3fba51
MP
490 * c-typeck.c (c_build_va_arg): Clarify the error message.
491
b811915d
TS
4922015-04-29 Thomas Schwinge <thomas@codesourcery.com>
493
494 * c-parser.c (c_parser_oacc_enter_exit_data): Use
495 OMP_STANDALONE_CLAUSES.
496
f3075008
MP
4972015-04-28 Marek Polacek <polacek@redhat.com>
498
499 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
500
4e81b788
MP
5012015-04-28 Marek Polacek <polacek@redhat.com>
502
503 PR c/65901
504 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
505
6c1db78e
MP
5062015-04-25 Marek Polacek <polacek@redhat.com>
507
508 PR c/52085
509 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
510 attribute.
511
5c4abbb8
MP
5122015-04-23 Marek Polacek <polacek@redhat.com>
513
514 PR c/65345
515 * c-decl.c (set_labels_context_r): New function.
516 (store_parm_decls): Call it via walk_tree_without_duplicates.
517 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
518 instead of create_tmp_var. Build TARGET_EXPR instead of
519 COMPOUND_EXPR.
520 (build_atomic_assign): Use create_tmp_var_raw instead of
521 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
522
06aca1d5
IV
5232015-04-20 Ilya Verbin <ilya.verbin@intel.com>
524
525 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
526 (c_parser_omp_target_update): Add missed %> to error_at ().
527
8fba1830
BRF
5282015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
529
530 PR target/55143
531 * c-decl.c (c_default_pointer_mode): Remove definition.
532 * c-tree.h (c_default_pointer_mode): Remove declaration.
533
62021f64
TB
5342015-03-27 Tobias Burnus <burnus@net-b.de>
535
536 PR c/65586
537 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
538 error out.
539 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
540 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
541 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
542
9b65e171
JJ
5432015-03-19 Jakub Jelinek <jakub@redhat.com>
544
545 * c-decl.c (c_decl_attributes): Also add "omp declare target"
546 attribute for DECL_EXTERNAL VAR_DECLs.
547
17958621
JJ
5482015-03-11 Jakub Jelinek <jakub@redhat.com>
549
550 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
551 argument.
552
7ccb1a11
JJ
5532015-03-10 Jakub Jelinek <jakub@redhat.com>
554
555 PR c/65120
556 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
557 before preparing arguments to warn_logical_not_parentheses.
558
01177669
JJ
5592015-03-09 Jakub Jelinek <jakub@redhat.com>
560
561 PR c/65120
562 * c-typeck.c (parser_build_binary_op): Don't warn for
563 !!x == y or !b == y where b is _Bool.
564
802ac282
MP
5652015-03-09 Marek Polacek <polacek@redhat.com>
566
567 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
568 * c-decl.c (grokdeclarator): Likewise.
569 * c-typeck.c (build_binary_op): Likewise.
570
e5165b60
MP
5712015-02-27 Marek Polacek <polacek@redhat.com>
572
573 PR c/65228
574 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
575
065d214c
MP
5762015-02-14 Marek Polacek <polacek@redhat.com>
577
578 PR c/64768
579 * c-decl.c (grokdeclarator): Set the range of a flexible array member
580 declared through a typedef name.
581
e5d9235b
MP
5822015-02-13 Marek Polacek <polacek@redhat.com>
583
584 PR c/65050
585 * c-decl.c (grokdeclarator): Print also the type when giving
586 the error message about array's incomplete element type.
587
fa01ffcc
JJ
5882015-02-11 Jakub Jelinek <jakub@redhat.com>
589
590 PR c/64824
591 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
592 check in the POP macro.
593
c3e38a03
MP
5942015-02-09 Marek Polacek <polacek@redhat.com>
595
596 PR c/64856
597 * c-typeck.c (process_init_element): Don't always wrap
598 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
599 initializing a range of elements.
600
4886ec8e
JJ
6012015-02-04 Jakub Jelinek <jakub@redhat.com>
602
603 PR c/64824
604 PR c/64868
605 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
606
c3e38a03 6072015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
608
609 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
610 processing enum declaration.
611
7b33f0c8
MP
6122015-01-29 Marek Polacek <polacek@redhat.com>
613
614 PR c/64709
615 * c-typeck.c (pop_init_level): If constructor_elements has
616 exactly one element with integer_zerop value, set constructor_zeroinit
617 to 1. Remove braces around warning_init call.
618
dea63e49
JJ
6192015-01-27 Jakub Jelinek <jakub@redhat.com>
620
621 PR c/64766
622 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
623 of FUNCTION_DECLs with error_mark_node.
624
d38f7dce
JJ
6252015-01-26 Jakub Jelinek <jakub@redhat.com>
626
627 PR c/64778
628 * c-typeck.c (convert_arguments): Return -1 if there are
629 error_args, even if we've diagnosed too many arguments.
630
cbf5d0e7
RB
6312015-01-21 Richard Biener <rguenther@suse.de>
632
633 PR middle-end/64313
634 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
635 for builtins the user declared correctly.
636
41dbbb37
TS
6372015-01-15 Thomas Schwinge <thomas@codesourcery.com>
638 Bernd Schmidt <bernds@codesourcery.com>
639 Cesar Philippidis <cesar@codesourcery.com>
640 James Norris <jnorris@codesourcery.com>
641 Jakub Jelinek <jakub@redhat.com>
642 Ilmir Usmanov <i.usmanov@samsung.com>
643
644 * c-parser.c: Include "gomp-constants.h".
645 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
646 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
647 Use OMP_CLAUSE_SET_MAP_KIND.
648 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
649 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
650 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
651 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
652 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
653 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
654 "copyout", "create", "delete", "deviceptr", "gang", "host",
655 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
656 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
657 "present_or_create", "pcreate", "seq", "self", "vector",
658 "vector_length", "wait", "worker".
659 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
660 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
661 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
662 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
663 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
664 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
665 (c_parser_oacc_data_clause_deviceptr)
666 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
667 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
668 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
669 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
670 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
671 (c_parser_oacc_parallel, c_parser_oacc_update)
672 (c_parser_oacc_wait): New functions.
673 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
674 (c_finish_oacc_data): New prototypes.
675 * c-typeck.c: Include "gomp-constants.h".
676 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
677 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
678 OMP_CLAUSE_SET_MAP_KIND.
679 (c_finish_oacc_parallel, c_finish_oacc_kernels)
680 (c_finish_oacc_data): New functions.
681 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
682 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
683 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
684 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
685 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
686 GOMP_MAP_FORCE_DEVICEPTR.
687
adfac8df
JJ
6882015-01-09 Michael Collison <michael.collison@linaro.org>
689
690 * c-array-notation.c: Include hash-set.h, machmode.h,
691 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
692 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
693 * c-aux-info.c: Ditto.
694 * c-convert.c: Ditto.
695 * c-decl.c: Ditto.
696 * c-errors.c: Ditto.
697 * c-lang.c: Dittoxs.
698 * c-objc-common.c: Ditto.
699 * c-parser.c: Ditto.
700 * c-typeck.c: Include hash-set.h, machmode.h,
701 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
702 fold-const.h, wide-int.h, inchash.h, real.h and
703 fixed-value.h due to flattening of tree.h.
704
2cc901dc
MP
7052015-01-07 Marek Polacek <polacek@redhat.com>
706
707 PR c/64417
708 * c-typeck.c (process_init_element): Disallow initialization of
709 a flexible array member with a string constant if the structure
710 is in an array.
711
5624e564
JJ
7122015-01-05 Jakub Jelinek <jakub@redhat.com>
713
e5341100
JJ
714 PR sanitizer/64344
715 * c-typeck.c (convert_for_assignment, c_finish_return): For
716 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
717 types also set in_late_binary_op around convert call.
718 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
719 to integral type casts, if not in_late_binary_op, pass c_fully_fold
720 result on expr as last argument to ubsan_instrument_float_cast,
721 if in_late_binary_op, don't use c_save_expr but save_expr.
722
5624e564
JJ
723 Update copyright years.
724
5bd012f8
MP
7252015-01-05 Marek Polacek <polacek@redhat.com>
726
727 PR c/64423
728 * c-typeck.c (build_array_ref): Pass loc down to
729 warn_array_subscript_with_type_char.
730
768952be
MU
7312014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
732
733 * c-typeck.c: New behavious for pointers to arrays with qualifiers
734 (common-pointer-type): For pointers to arrays take qualifiers from
735 element type.
736 (build_conditional_expr): Add warnings for lost qualifiers.
737 (comp-target-types): Allow pointers to arrays with different qualifiers.
738 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
739 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
740 to PEDWARN_FOR_QUALIFIERS.
741
8f94a8c4
JJ
7422014-12-17 Jakub Jelinek <jakub@redhat.com>
743
744 PR sanitizer/64289
745 * c-convert.c: Include ubsan.h.
746 (convert): For real -> integral casts and
747 -fsanitize=float-cast-overflow don't call convert_to_integer, but
748 instead instrument the float cast directly.
749
b731b390
JJ
7502014-11-29 Jakub Jelinek <jakub@redhat.com>
751
752 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
753 c_finish_stmt_expr): Remove NULL last argument from
754 create_tmp_var_raw and create_tmp_var calls.
755 * c-array-notation.c (fix_builtin_array_notation_fn,
756 build_array_notation_expr, fix_conditional_array_notations_1,
757 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
758
541e35a6
MP
7592014-11-28 Marek Polacek <polacek@redhat.com>
760
761 PR c/63862
762 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
763 convert the right operand to integer type.
764
b286be94
MP
7652014-11-25 Marek Polacek <polacek@redhat.com>
766
767 PR c/63877
768 * c-decl.c (start_function): Disable -Wmissing-declarations warning
769 for inline functions.
770
aa7da51a
JJ
7712014-11-21 Jakub Jelinek <jakub@redhat.com>
772
773 PR target/63764
774 * c-typeck.c (build_array_ref): Adjust
775 convert_vector_to_pointer_for_subscript caller. If it returns true,
776 call non_lvalue_loc on the result.
777
d876207f
RB
7782014-11-11 Richard Biener <rguenther@suse.de>
779
780 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
781 to true.
782
e5e44252
AK
7832014-11-10 Andi Kleen <ak@linux.intel.com>
784
785 PR c/60804
786 * c-parser.c (c_parser_statement_after_labels): Call
787 check_no_cilk.
788 (c_parser_if_statement): Dito.
789 (c_parser_switch_statement): Dito.
790 (c_parser_while_statement): Dito.
791 (c_parser_do_statement): Dito.
792 (c_parser_for_statement): Dito.
793 * c-typeck.c (c_finish_loop): Dito.
794
13c21655
PC
7952014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
796
797 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
798 OPT_Wshift_count_overflow in the warnings.
799
2d51fcef
MP
8002014-10-30 Marek Polacek <polacek@redhat.com>
801
802 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
803 print the stripped version as well, if they're not the same.
804
ef4bddc2
RS
8052014-10-29 Richard Sandiford <richard.sandiford@arm.com>
806
807 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
808 machine_mode.
809
c582198b
AM
8102014-10-28 Andrew MacLeod <amacleod@redhat.com>
811
812 * c-decl.c: Adjust include files.
813 * c-parser.c: Ditto.
814
ddc8de03
PM
8152014-10-27 Phil Muldoon <pmuldoon@redhat.com>
816 Tom Tromey <tromey@redhat.com>
817
818 * c-tree.h (enum c_oracle_request): New.
819 (c_binding_oracle_function): New typedef.
820 (c_binding_oracle, c_pushtag, c_bind): Declare.
821 * c-decl.c (c_binding_oracle): New global.
822 (I_SYMBOL_CHECKED): New macro.
823 (i_symbol_binding): New function.
824 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
825 (I_TAG_CHECKED): New macro.
826 (i_tag_binding): New function.
827 (I_TAG_BINDING, I_TAG_DECL): Redefine.
828 (I_LABEL_CHECKED): New macro.
829 (i_label_binding): New function.
830 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
831 (c_print_identifier): Save and restore c_binding_oracle.
832 (c_pushtag, c_bind): New functions.
833
60393bbc
AM
8342014-10-27 Andrew MacLeod <amacleod@redhat.com>
835
836 * c-typeck.c: Adjust include files.
837
d723bb7c
MLI
8382014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
839
840 PR c++/53061
841 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
842 initialization here...
843 (c_initialize_diagnostics): ... but here. Set defaults after
844 building pretty-printer.
845
1bc5a451
MP
8462014-10-23 Marek Polacek <polacek@redhat.com>
847
848 PR c/63626
849 * c-decl.c (pop_scope): Don't print warning in external_scope.
850
4435bb92
MP
8512014-10-19 Marek Polacek <polacek@redhat.com>
852
853 PR c/63567
854 * c-typeck.c (output_init_element): Allow initializing objects with
855 static storage duration with compound literals even in C99 and add
856 pedwarn for it.
857
7278465e
MP
8582014-10-17 Marek Polacek <polacek@redhat.com>
859
860 PR c/63567
861 * c-typeck.c (digest_init): Allow initializing objects with static
862 storage duration with compound literals even in C99 and add pedwarn
863 for it.
864
d9b7be2e
MP
8652014-10-17 Marek Polacek <polacek@redhat.com>
866
867 PR c/63543
868 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
869 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
870 error multiple times. Print the type.
871
f406ae1f
MP
8722014-10-17 Marek Polacek <polacek@redhat.com>
873
874 PR c/63549
875 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
876 type.
877
92574c7c
MP
8782014-10-17 Marek Polacek <polacek@redhat.com>
879
880 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
881 (start_function): Use OPT_Wimplicit_int instead of 0.
882 (store_parm_decls_oldstyle): Likewise.
883
1bc4a978
MT
8842014-10-17 Alan Modra <amodra@gmail.com>
885
886 PR middle-end/61848
887 * c-decl.c (merge_decls): Don't merge section name or tls model
888 to newdecl symtab node, instead merge to olddecl. Override
889 existing olddecl section name. Set tls_model for all thread-local
890 vars, not just OMP thread-private ones. Remove incorrect comment.
891
83685514
AM
8922014-10-16 Andrew MacLeod <amacleod@redhat.com>
893
894 * c-decl.c: Adjust include files.
895
78a7c317
DD
8962014-10-14 DJ Delorie <dj@redhat.com>
897
898 * c-parser.c (c_parse_init): Add RID entries for each __intN.
899 (c_token_starts_typename): Check all __intN, not just __int128.
900 (c_token_starts_declspecs): Likewise.
901 (c_parser_declspecs): Likewise.
902 (c_parser_attribute_any_word): Likewise.
903 (c_parser_objc_selector): Likewise.
904 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
905 (struct c_declspecs): Add int_n_idx field to record *which* __intN
906 is specified.
907 * c-decl.c (declspecs_add_type): Check for all __intN, not just
908 __int128.
909 (finish_declspecs): Likewise.
910
74d98c1e
AB
9112014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
912
913 * c-parser.c (c_parser_all_labels): New function to replace
914 the duplicate code.
915 (c_parser_statement): Call the new function.
916
84937de2
MP
9172014-10-09 Marek Polacek <polacek@redhat.com>
918
919 PR c/63480
920 * c-typeck.c (pop_init_level): Don't warn about initializing
921 with { }.
922
0382aaa0
MP
9232014-10-07 Marek Polacek <polacek@redhat.com>
924
925 PR c/59717
926 * c-decl.c (header_for_builtin_fn): New function.
927 (implicitly_declare): Suggest which header to include.
928
7a0ca710
MP
9292014-10-07 Marek Polacek <polacek@redhat.com>
930
931 * c-convert.c (convert): Use error_operand_p.
932 * c-typeck.c (require_complete_type): Likewise.
933 (really_atomic_lvalue): Likewise.
934 (digest_init): Likewise.
935 (handle_omp_array_sections_1): Likewise.
936
6bc8a126
MP
9372014-10-03 Marek Polacek <polacek@redhat.com>
938
939 PR c/63453
940 * c-decl.c (pop_scope): Don't warn about "inline function declared
941 but never defined" for functions marked with gnu_inline attribute.
942
d90c0a59
JJ
9432014-09-25 Jakub Jelinek <jakub@redhat.com>
944
945 PR c++/63249
946 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
947 on low_bound and length.
948
083e891e
MP
9492014-09-24 Marek Polacek <polacek@redhat.com>
950
951 PR c/61405
952 PR c/53874
953 * c-parser.c: Don't define CPP_KEYWORD.
954 (c_parser_switch_statement): Pass original type to c_finish_case.
955 * c-tree.h (c_finish_case): Update declaration.
956 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
957 conditionally to c_do_switch_warnings.
958
8d95fe25
MP
9592014-09-03 Marek Polacek <polacek@redhat.com>
960
961 PR c/62024
962 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
963 conversions.
964
9a771876
JJ
9652014-09-02 Jakub Jelinek <jakub@redhat.com>
966 Balaji V. Iyer <balaji.v.iyer@intel.com>
967 Igor Zamyatin <igor.zamyatin@intel.com>
968
969 * c-parser.c (c_parser_cilk_for): New function.
970 (c_parser_cilk_grainsize): Likewise.
971 (c_get_temp_regvar): Likewise.
972 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
973 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
974 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
975 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
976 case.
977
b7679d96
CG
9782014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
979
980 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
981 with using HOST_WIDE_INT without truncation to 'int'
982
59ea0364
MP
9832014-08-22 Marek Polacek <polacek@redhat.com>
984
985 PR c++/62199
986 * c-typeck.c (parser_build_binary_op): Adjust call to
987 warn_logical_not_parentheses.
988
671a475e
IZ
9892014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
990
991 PR other/62008
992 * c-parser.c (c_parser_array_notation): Check for correct
993 type of an array added.
994
04159acf
MP
9952014-08-19 Marek Polacek <polacek@redhat.com>
996
997 PR c++/62153
998 * c-typeck.c (build_binary_op): If either operand of a comparison
999 is a boolean expression, call maybe_warn_bool_compare.
1000
c77935ee
PP
10012014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1002
1003 PR c/45584
1004 * c-typeck.c (build_c_cast): Do a conversion even when the
1005 TYPE_MAIN_VARIANTs are the same.
1006
35aff4fb
MP
10072014-08-19 Marek Polacek <polacek@redhat.com>
1008
1009 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1010 pedwarn_c99 instead of pedwarn.
1011 (grokfield): Likewise.
1012 (warn_defaults_to): New function.
1013 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1014 Unconditionally call pedwarn_c99 instead of pedwarn.
1015 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1016 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1017 check flag_isoc11 before.
1018 * c-errors.c (pedwarn_c99): Change the return type to bool.
1019 Handle -Wc99-c11-compat.
1020 * c-parser.c (disable_extension_diagnostics): Handle
1021 warn_c99_c11_compat.
1022 (restore_extension_diagnostics): Likewise.
1023 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1024 instead of pedwarn, don't check flag_isoc11 before.
1025 (c_parser_declspecs): Likewise.
1026 (c_parser_alignas_specifier): Likewise.
1027 (c_parser_alignof_expression): Likewise.
1028 (c_parser_generic_selection): Likewise.
1029 * c-tree.h (pedwarn_c99): Update declaration.
1030 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1031 of pedwarn_c99.
1032
177cce46
MP
10332014-08-19 Marek Polacek <polacek@redhat.com>
1034
1035 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1036 to pedwarn_c90.
1037 * c-errors.c: Include "opts.h".
1038 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1039 * c-parser.c (disable_extension_diagnostics): Handle negative value
1040 of warn_c90_c99_compat, too.
1041 (restore_extension_diagnostics): Likewise.
1042 (c_parser_compound_statement_nostart): Pass
1043 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1044
6dc99c33
MP
10452014-08-12 Marek Polacek <polacek@redhat.com>
1046
1047 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1048 Add pedwarn.
1049 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1050 Likewise.
1051 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1052
f3bede71
MP
10532014-08-10 Marek Polacek <polacek@redhat.com>
1054
1055 PR c/51849
1056 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1057 Call pedwarn_c90 instead of pedwarn.
1058 (check_bitfield_type_and_width): Likewise.
1059 (declspecs_add_qual): Likewise.
1060 (declspecs_add_type): Likewise.
1061 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1062 Adjust to only call pedwarn_c90.
1063 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1064 pedwarn_c90 instead of pedwarn.
1065 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1066 * c-parser.c (disable_extension_diagnostics): Handle
1067 warn_c90_c99_compat.
1068 (restore_extension_diagnostics): Likewise.
1069 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1070 pedwarn_c90 instead of pedwarn.
1071 (c_parser_initelt): Likewise.
1072 (c_parser_postfix_expression): Likewise.
1073 (c_parser_postfix_expression_after_paren_type): Likewise.
1074 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1075 * c-tree.h: Fix formatting.
1076 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1077 pedwarn_c90 instead of pedwarn.
1078
9f25a338
TS
10792014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1080
1081 * c-typeck.c: Remove include of pointer-set.h.
1082
044331a8
MP
10832014-08-07 Marek Polacek <polacek@redhat.com>
1084
1085 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1086
b787e7a2
TS
10872014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1088
1089 * c-typeck.c: Use hash_map instead of pointer_map.
1090
6e2830c3
TS
10912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1092
1093 * c-decl.c: Use hash_set instead of pointer_set.
1094
a7ee52fb
IZ
10952014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1096
1097 PR middle-end/61455
1098 * c-array-notation.c (expand_array_notations): Handling
1099 of DECL_EXPR added.
1100
b4dfdc11
MG
11012014-07-31 Marc Glisse <marc.glisse@inria.fr>
1102
1103 PR c++/60517
1104 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1105 a local variable.
1106
976d5a22
TT
11072014-07-30 Tom Tromey <tromey@redhat.com>
1108
1109 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1110 field.
1111 (really_start_incremental_init, push_init_level): Initialize
1112 designator_depth.
1113 (pop_init_level): Set global designator_depth.
1114 (process_init_element): Check for designated_init attribute.
1115
30281de2
MP
11162014-07-20 Marek Polacek <polacek@redhat.com>
1117
1118 PR c/61852
1119 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1120 (implicitly_declare): Pass location to implicit_decl_warning.
1121
b108f48f
JJ
11222014-07-14 Jakub Jelinek <jakub@redhat.com>
1123
1124 PR middle-end/61294
1125 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1126 If non-NULL, call c_parser_check_literal_zero.
1127 (c_parser_check_literal_zero): New function.
1128 (c_parser_postfix_expression_after_primary): Adjust
1129 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1130
773ec47f
MP
11312014-07-06 Marek Polacek <polacek@redhat.com>
1132
1133 PR c/6940
1134 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1135 * c-tree.h (C_ARRAY_PARAMETER): Define.
1136 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1137 function parameter.
1138
22e1cf1c
JH
11392014-07-02 Jan Hubicka <hubicka@ucw.cz>
1140 Chen Gang <gang.chen.5i5j@gmail.com>
1141
1142 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1143 releasing symbol.
1144
52ec0ea3
MP
11452014-07-01 Marek Polacek <polacek@redhat.com>
1146
1147 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1148 instead of 0 to WARN_FOR_ASSIGNMENT.
1149
d5c3d343
MP
11502014-07-01 Marek Polacek <polacek@redhat.com>
1151
1152 PR c/58286
1153 * c-typeck.c (convert_for_assignment): Pass
1154 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1155
6a7253a4
MP
11562014-06-30 Marek Polacek <polacek@redhat.com>
1157
1158 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1159 has no_sanitize_undefined attribute.
1160
5e88a8f4
IZ
11612014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1162
1163 PR middle-end/57541
1164 * c-array-notation.c (fix_builtin_array_notation_fn):
1165 Check for 0 arguments in builtin call. Check that bultin argument is
1166 correct.
1167 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1168 index.
1169
9698b078
SH
11702014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1171
1172 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1173 qualifiers in __auto_type for atomic types.
1174 (c_parser_typeof_specifier): Discard all type qualifiers in
1175 __typeof__ for atomic types.
1176
6e07c515
MP
11772014-06-25 Marek Polacek <polacek@redhat.com>
1178
1179 PR c/61162
1180 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1181 the return expression to c_finish_return.
1182
da6f124d
JJ
11832014-06-25 Jakub Jelinek <jakub@redhat.com>
1184
1185 * c-typeck.c (c_finish_omp_clauses): Make sure
1186 OMP_CLAUSE_LINEAR_STEP has correct type.
1187
c203e8a7
TS
11882014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1189
1190 * c-decl.c: Adjust.
1191
56ad0e38
JJ
11922014-06-24 Jakub Jelinek <jakub@redhat.com>
1193
1194 * c-parser.c (c_parser_omp_for_loop): For
1195 #pragma omp parallel for simd move lastprivate clause from parallel
1196 to for rather than simd.
1197
47c2554f
MP
11982014-06-23 Marek Polacek <polacek@redhat.com>
1199
1200 * c-typeck.c (parser_build_binary_op): Don't call
1201 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1202
56363ffd
JH
12032014-06-15 Jan Hubicka <hubicka@ucw.cz>
1204
1205 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1206 * c-decl.c (merge_decls): Likewise.
1207
d7ff7ae5
MP
12082014-06-09 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/36446
1211 * c-typeck.c (error_init): Call inform instead of error_at.
1212 (pedwarn_init): Call inform instead of pedwarn.
1213 (warning_init): Call inform instead of warning_at.
1214
24d047a3
JH
12152014-06-07 Jan Hubicka <hubicka@ucw.cz>
1216
1217 * c-decl.c (merge_decls): Use set_decl_section_name.
1218 (duplicate_decls): Remove node if it exists.
1219
9bac5cbb
G
12202014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1221
1222 PR c/53119
1223 * c-typeck.c (push_init_level, process_init_element,
1224 pop_init_level): Correct check for zero initialization, move
1225 missing brace warning to respect zero initialization.
1226
8ffcdea8
MP
12272014-06-05 Marek Polacek <polacek@redhat.com>
1228
1229 PR c/56724
1230 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1231
742938c9
MP
12322014-06-05 Marek Polacek <polacek@redhat.com>
1233
1234 PR c/49706
1235 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1236 on the left hand side operand of a comparison.
1237
6447c55d
MP
12382014-06-05 Marek Polacek <polacek@redhat.com>
1239
1240 PR c/48062
1241 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1242 Print note only if the warning was printed.
1243
9dc7743c
IZ
12442014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1245
1246 PR c/58942
1247 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1248 with a pointer.
1249
fedfecef
MP
12502014-06-03 Marek Polacek <polacek@redhat.com>
1251
1252 PR c/60439
1253 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1254 c_start_case.
1255 * c-tree.h (c_start_case): Update.
1256 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1257 switch condition has boolean value.
1258
9b2b7279
AM
12592014-06-02 Andrew MacLeod <amacleod@redhat.com>
1260
1261 * c-decl.c: Include builtins.h.
1262 * c-parser.c: Likewise.
1263
5c1bc275
MP
12642014-05-27 Marek Polacek <polacek@redhat.com>
1265
1266 PR c/56724
1267 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1268 error and warning calls to error_at and warning_at. Pass location of
1269 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1270 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1271 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1272
97563bc8
IZ
12732014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1274
1275 PR c/61191
1276 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1277 function parameters.
1278
aede2c10
JH
12792014-05-23 Jan Hubicka <hubicka@ucw.cz>
1280
1281 * c-decl.c (merge_decls): Preserve symtab node pointers.
1282 (duplicate_decls): Free new decl.
1283
edbba2ce
TS
12842014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1285
f3316c6d
TS
1286 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1287 initialization.
1288
edbba2ce
TS
1289 * c-parser.c (c_parser_omp_target): Return bool values.
1290
68c81f24
TS
12912014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1292
1293 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1294 num_teams_loc variable to num_thread_limit_loc.
1295
632f2871
RS
12962014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1297
1298 * c-array-notation.c (expand_array_notations): Use void_node
1299 instead of void_zero_node.
1300
766090c2
TS
13012014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1302
1303 * c-decl.c (finish_struct): Adjust.
1304 (finish_enum): Likewise.
1305 (bind): Adjust.
1306 (record_inline_static): Likewise.
1307 (push_scope): Likewise.
1308 (make_label): Likewise.
1309 (lookup_label_for_goto): Likewise.
1310 (finish_struct): Likewise.
1311 (finish_enum): Likewise.
1312 (store_parm_decls): Likewise.
1313 (c_push_function_context): Likewise.
1314 * c-lang.h: Remove usage of variable_size gty attribute.
1315 * c-parser.c (c_parse_init): Adjust.
1316 (c_parse_file): Likewise.
1317
2b107f6b
MP
13182014-05-13 Marek Polacek <polacek@redhat.com>
1319
1320 PR c/61162
1321 * c-typeck.c (convert_for_assignment): Pass location to
1322 WARN_FOR_ASSIGNMENT instead of input_location.
1323
d033409e
MP
13242014-05-10 Marek Polacek <polacek@redhat.com>
1325
1326 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1327 maybe_warn_string_init.
1328 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1329 maybe_warn_string_init.
1330 * c-tree.h (maybe_warn_string_init): Update declaration.
1331 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1332 Call pedwarn_init with loc instead of with input_location.
1333 (digest_init): Pass init_loc to maybe_warn_string_init.
1334 (pop_init_level): Call pedwarn_init with loc instead of with
1335 input_location.
1336 (set_init_index): Likewise.
1337 (process_init_element): Likewise.
1338
ea58ef42
MP
13392014-05-09 Marek Polacek <polacek@redhat.com>
1340
1341 PR c/61096
1342 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1343 (c_parser_initelt): Pass location to set_init_label. Pass array index
1344 location to set_init_index.
1345 * c-tree.h (push_init_level): Update declaration.
1346 (pop_init_level): Likewise.
1347 (set_init_index): Likewise.
1348 (set_init_label): Likewise.
1349 * c-typeck.c (error_init): Add location parameter. Call error_at
1350 instead of error.
1351 (digest_init): Pass init_loc to error_init.
1352 (really_start_incremental_init):
1353 (push_init_level): Add location parameter. Pass loc to pop_init_level
1354 and error_init.
1355 (pop_init_level): Likewise.
1356 (set_designator): Add location parameter. Pass loc to pop_init_level,
1357 push_init_level, and error_init.
1358 (set_init_index): Add location parameter. Pass loc to error_init and
1359 set_designator.
1360 (set_init_label): Likewise.
1361 (output_init_element): Pass loc to error_init.
1362 (process_init_element): Pass loc to error_init, pop_init_level,
1363 pedwarn_init, and push_init_level.
1364
661a0813
MP
13652014-05-09 Marek Polacek <polacek@redhat.com>
1366
1367 PR c/50459
1368 * c-parser.c (c_parser_attributes): Parse the arguments as an
1369 expression-list if the attribute takes identifier.
1370
2793eeab
MP
13712014-05-08 Marek Polacek <polacek@redhat.com>
1372
1373 PR c/61053
1374 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1375 TYPE_ALIGN_UNIT.
1376
f827930a
MP
13772014-05-08 Marek Polacek <polacek@redhat.com>
1378
1379 PR c/61077
1380 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1381 of main.
1382
1d60af08
KZ
13832014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1384 Mike Stump <mikestump@comcast.net>
1385 Richard Sandiford <rdsandiford@googlemail.com>
1386
1387 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1388 (finish_enum): Use wide-int interfaces.
1389 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1390 * c-typeck.c (build_c_cast): Likewise.
1391 (set_nonincremental_init_from_string): Likewise.
1392 (c_tree_equal): Likewise.
1393
a0e24419
MP
13942014-05-02 Marek Polacek <polacek@redhat.com>
1395
1396 PR c/25801
1397 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1398 Return size_one_node when the type is not complete.
1399 (pointer_diff): Remove comment.
1400 (build_unary_op): Improve error messages.
1401
19fc9faa
MP
14022014-05-02 Marek Polacek <polacek@redhat.com>
1403
1404 * c-typeck.c (c_finish_return): Separate warning_at calls.
1405
63bc4e87
MP
14062014-05-02 Marek Polacek <polacek@redhat.com>
1407
1408 * c-tree.h (error_init): Remove declaration.
1409 (pedwarn_init): Likewise.
1410 * c-typeck.c (error_init): Make static and move above.
1411 (pedwarn_init): Likewise.
1412 (warning_init): Move above.
1413 (maybe_warn_string_init): Likewise.
1414
4bd2511b
JL
14152014-05-01 Jeff Law <law@redhat.com>
1416
1417 Revert:
1418
1419 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1420 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1421 avoid goto.
1422
6a358dcb
MP
14232014-05-02 Marek Polacek <polacek@redhat.com>
1424
1425 PR c/60784
1426 * c-typeck.c (push_init_level): Set constructor_designated to
1427 p->designated for structures.
1428
ae5ebda4
MP
14292014-05-01 Marek Polacek <polacek@redhat.com>
1430
1431 PR c/60915
1432 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1433 function-definition has an attribute after the declarator.
1434
96b40f8d
MP
14352014-05-01 Marek Polacek <polacek@redhat.com>
1436
1437 PR c/60257
1438 * c-typeck.c (warning_init): Add location_t parameter. Call
1439 warning_at instead of warning.
1440 (push_init_level): Pass input_location to warning_init.
1441 (add_pending_init): Add location_t parameter. Pass loc to
1442 warning_init.
1443 (set_nonincremental_init): Pass input_location to add_pending_init.
1444 (set_nonincremental_init_from_string): Likewise.
1445 (output_init_element): Pass loc to warning_init and to
1446 add_pending_init.
1447
32e00768
MP
14482014-05-01 Marek Polacek <polacek@redhat.com>
1449
1450 PR c/43395
1451 * c-typeck.c (c_finish_return): Distinguish between label and variable
1452 when warning about returning local address.
1453
c9379ce2
MP
14542014-05-01 Marek Polacek <polacek@redhat.com>
1455
1456 PR c/29467
1457 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1458 in C89 mode.
1459
d00887e8
MP
14602014-05-01 Marek Polacek <polacek@redhat.com>
1461
1462 PR c/43245
1463 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1464 instead of 0 to WARN_FOR_QUALIFIERS.
1465
5436fa2e
MP
14662014-05-01 Marek Polacek <polacek@redhat.com>
1467
1468 PR c/56989
1469 * c-typeck.c (default_conversion): Use better location for
1470 error call.
1471
f8ed5150
MP
14722014-04-30 Marek Polacek <polacek@redhat.com>
1473
1474 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1475 also when SANITIZE_FLOAT_DIVIDE is on.
1476
8337d1db
MP
14772014-04-30 Marek Polacek <polacek@redhat.com>
1478
1479 PR c/60139
1480 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1481 and pedwarn_init. Use loc insted of input_location.
1482
c4bdc42f
MP
14832014-04-30 Marek Polacek <polacek@redhat.com>
1484
1485 PR c/60351
1486 * c-typeck.c (build_binary_op): Use location when warning about
1487 shift count.
1488
45484dcf
MP
14892014-04-25 Marek Polacek <polacek@redhat.com>
1490
1491 PR c/18079
1492 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1493 always_inline/noinline and hot/cold attributes.
1494
34cf811f
MP
14952014-04-25 Marek Polacek <polacek@redhat.com>
1496
1497 PR c/60114
1498 * c-parser.c (c_parser_initelt): Pass input_location to
1499 process_init_element.
1500 (c_parser_initval): Pass loc to process_init_element.
1501 * c-tree.h (process_init_element): Adjust declaration.
1502 * c-typeck.c (push_init_level): Pass input_location to
1503 process_init_element.
1504 (pop_init_level): Likewise.
1505 (set_designator): Likewise.
1506 (output_init_element): Add location_t parameter. Pass loc to
1507 digest_init.
1508 (output_pending_init_elements): Pass input_location to
1509 output_init_element.
1510 (process_init_element): Add location_t parameter. Pass loc to
1511 output_init_element.
1512
42056eac
JJ
15132014-04-24 Jakub Jelinek <jakub@redhat.com>
1514
1515 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1516 atomic-clause, allow comma in between atomic-clause and
1517 seq_cst.
1518
e162a134
JJ
15192014-04-22 Jakub Jelinek <jakub@redhat.com>
1520
1521 PR c/59073
1522 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1523 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1524
2f6babac
IZ
15252014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1526
1527 PR middle-end/60469
1528 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1529 create_tmp_var instead build_decl for creating temps.
1530 (build_array_notation_expr): Likewise.
1531 (fix_conditional_array_notations_1): Likewise.
1532 (fix_array_notation_expr): Likewise.
1533 (fix_array_notation_call_expr): Likewise.
1534
8edbfaa6
JJ
15352014-03-28 Jakub Jelinek <jakub@redhat.com>
1536
1537 PR c++/60689
1538 * c-tree.h (c_build_function_call_vec): New prototype.
1539 * c-typeck.c (build_function_call_vec): Don't call
1540 resolve_overloaded_builtin here.
1541 (c_build_function_call_vec): New wrapper function around
1542 build_function_call_vec. Call resolve_overloaded_builtin here.
1543 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1544 Call c_build_function_call_vec instead of build_function_call_vec.
1545 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1546 * c-decl.c (finish_decl): Likewise.
1547
7485aeea
MLI
15482014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1549
1550 PR c/55383
1551 * c-typeck.c: Use correct format string in cast-qual warning
1552
b17a8b07
TS
15532014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1554
1555 * c-decl.c (c_decl_attributes): Use
1556 lang_hooks.types.omp_mappable_type.
1557 * c-typeck.c (c_finish_omp_clauses): Likewise.
1558
3af9c5e9
MP
15592014-03-06 Marek Polacek <polacek@redhat.com>
1560
1561 PR c/60197
1562 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1563 of checking tree code.
1564
1c9f5f33
PK
15652014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1566
1567 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1568 (c_parser_parameter_declaration): Likewise.
1569
cc28fc7f
MP
15702014-02-19 Marek Polacek <polacek@redhat.com>
1571
1572 PR c/60195
1573 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1574 Call mark_exp_read on exp.value.
1575 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1576 TREE_ADDRESSABLE on old instead of val.
1577 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1578
b581c05c
PK
15792014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1580
1581 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1582 C_EXPR_APPEND by vec_safe_push.
1583 * c-tree.h (C_EXPR_APPEND): Remove.
1584
81e5eca8
MP
15852014-01-31 Marek Polacek <polacek@redhat.com>
1586
1587 PR c/59963
1588 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1589 build_function_call_vec.
1590 (build_function_call): Likewise.
1591 (build_atomic_assign): Likewise.
1592 (build_function_call_vec): Add arg_loc parameter. Use it.
1593 (convert_arguments): Likewise.
1594 (convert_for_assignment): Rename rhs_loc to expr_loc.
1595 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1596 (c_parser_objc_keywordexpr): Likewise.
1597 (c_parser_postfix_expression_after_primary): Call
1598 build_function_call_vec with expr_loc rather than op_loc.
1599 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1600 build_function_call_vec.
1601 (c_parser_expr_list): Add locations parameter. Fill it with locations
1602 of function arguments.
1603 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1604
68fca595
MP
16052014-01-30 Marek Polacek <polacek@redhat.com>
1606
1607 PR c/59940
1608 * c-typeck.c (build_function_call_vec): Use loc parameter.
1609 (convert_arguments): Add location parameter. Use it.
1610 (ep_convert_and_check): Likewise.
1611 (build_atomic_assign): Adjust convert_for_assignment call.
1612 (build_modify_expr): Likewise.
1613 (digest_init): Likewise.
1614 (c_finish_return): Likewise.
1615 (build_conditional_expr): Adjust ep_convert_and_check calls.
1616 (convert_for_assignment): Add rhs_loc parameter. Use it.
1617 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1618 calls.
1619
fa337f3a
RB
16202014-01-30 Richard Biener <rguenther@suse.de>
1621
1622 PR c/59905
1623 * c-typeck.c (build_function_call_vec): Do not replace calls
1624 to a function via an incompatible type with a runtime abort.
1625
b72271b9
BI
16262014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1627
1628 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1629 flag_enable_cilkplus with flag_cilkplus.
1630 (c_parser_direct_declarator_inner): Likewise.
1631 (c_parser_attribute_any_word): Likewise.
1632 (c_parser_attributes): Likewise.
1633 (c_parser_compound_statement): Likewise.
1634 (c_parser_statement_after_labels): Likewise.
1635 (c_parser_if_statement): Likewise.
1636 (c_parser_switch_statement): Likewise.
1637 (c_parser_do_statement): Likewise.
1638 (c_parser_for_statement): Likewise.
1639 (c_parser_unary_expression): Likewise.
1640 (c_parser_postfix_expression): Likewise.
1641 (c_parser_postfix_expression_after_primary): Likewise.
1642 (c_parser_postfix_expression_after_primary): Likewise.
1643 (c_parser_omp_clause_name): Likewise.
1644 (c_finish_omp_declare_simd): Likewise.
1645 (c_parser_cilk_verify_simd): Likewise.
1646 * c-typeck.c (build_array_ref): Likewise.
1647 (build_function_call_vec): Likewise.
1648 (convert_arguments): Likewise.
1649 (build_compound_expr): Likewise.
1650 (c_finish_return): Likewise.
1651 (c_finish_if_stmt): Likewise.
1652 (c_finish_loop): Likewise.
1653 (build_binary_op): Likewise.
1654
393e8e8b
MP
16552014-01-23 Marek Polacek <polacek@redhat.com>
1656
1657 PR c/59846
1658 * c-typeck.c (parser_build_binary_op): Use location instead of
1659 input_location.
1660 (build_binary_op): Pass location to shorten_compare.
1661
f04dda30
MP
16622014-01-23 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/58346
1665 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1666 an empty aggregate.
1667
789eadcd
MP
16682014-01-23 Marek Polacek <polacek@redhat.com>
1669
1670 PR c/59871
1671 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1672 of a comma expression.
1673 (emit_side_effect_warnings): Likewise.
1674
40f14e9f
BI
16752014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1676
1677 PR c/59825
1678 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1679 function to use walk_tree and moved a lot of its functionality to
1680 expand_array_notations.
1681 (expand_array_notations): New function.
1682
74558dd9
BI
16832014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1684
1685 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1686 attribute an attribute without value.
1687
652fea39
JJ
16882014-01-23 Jakub Jelinek <jakub@redhat.com>
1689
1690 PR middle-end/58809
1691 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1692 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1693
f34f1c87
MP
16942014-01-22 Marek Polacek <polacek@redhat.com>
1695
1696 PR c/59891
1697 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1698 of remove_c_maybe_const_expr on op1 and op2.
1699
241f845a
JJ
17002014-01-15 Jakub Jelinek <jakub@redhat.com>
1701
1702 PR c/58943
1703 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1704 effects, preevaluate rhs using SAVE_EXPR first.
1705
9a74f20c
BI
17062014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1707
1708 PR c++/59631
1709 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1710 statements with if-elseif statements.
1711
96066ce1
MP
17122014-01-06 Marek Polacek <polacek@redhat.com>
1713
1714 PR c/57773
1715 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1716 defined bit-field types only in ISO C.
1717
23a5b65a
RS
17182014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1719
1720 Update copyright years
1721
f9030485
RS
17222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1723
1724 * c-array-notation.c: Use the standard form for the copyright notice.
1725
41958c28
BI
17262013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1727
1728 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1729 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1730 field in parser is not empty. If not-empty, call the function
1731 c_parser_finish_omp_declare_simd.
1732 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1733 between SIMD-enabled functions and #pragma simd. Added new parameter.
1734 (c_parser_cilk_all_clauses): Modified the usage of the function
1735 c_parser_cilk_clause_vectorlength as mentioned above.
1736 (c_parser_cilk_simd_fn_vector_attrs): New function.
1737 (c_finish_cilk_simd_fn_tokens): Likewise.
1738 (is_cilkplus_vector_p): Likewise.
1739 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1740 "nomask," and "mask" strings in clause name.
1741 (c_parser_omp_all_clauses): Added 3 new case statements:
1742 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1743 PRAGMA_CILK_CLAUSE_NOMASK.
1744 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1745 check for vector attribute and if so call the function
1746 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1747 called the function c_finish_cilk_simd_fn_tokens.
1748 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1749 parser field is non-empty. If so, parse them as you would parse
1750 the omp declare simd pragma.
1751 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1752 Added a check when step is a parameter and flag it as error.
1753 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1754 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1755 pragma_omp_clause.
1756
cef0fd0e
TS
17572013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1758
1759 * c-parser.c (c_parser_omp_parallel): Fix description.
1760
12893402
BI
17612013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1762
1763 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1764 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1765 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1766 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1767
296674db
JM
17682013-12-04 Joseph Myers <joseph@codesourcery.com>
1769
1770 PR c/52023
1771 * c-parser.c (c_parser_alignas_specifier): Use
1772 c_sizeof_or_alignof_type instead of c_alignof.
1773 (c_parser_alignof_expression): Likewise, with min_alignof
1774 parameter depending on alignof spelling used.
1775
edd28054
MP
17762013-12-04 Marek Polacek <polacek@redhat.com>
1777
1778 PR c/54113
1779 * c-decl.c (start_function): Don't warn for missing prototype for
1780 inline functions.
1781
da0fc454
MP
17822013-12-03 Marek Polacek <polacek@redhat.com>
1783
1784 PR c/59351
1785 * c-decl.c (build_compound_literal): Allow compound literals with
1786 empty initial value.
1787
4c2ecab0
JM
17882013-12-02 Joseph Myers <joseph@codesourcery.com>
1789
1790 PR c/58235
1791 * c-typeck.c (build_modify_expr): Diagnose assignment to
1792 expression with array type.
1793
340baef7
JM
17942013-11-29 Joseph Myers <joseph@codesourcery.com>
1795
1796 PR c/42262
1797 * c-typeck.c (process_init_element): Do not treat a string as
1798 initializing a whole array when used with a designator for an
1799 individual element.
1800
6763b9f7
JM
18012013-11-29 Joseph Myers <joseph@codesourcery.com>
1802
1803 PR c/57574
1804 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1805 an inline function following a static declaration.
1806
e7bd1de1
JJ
18072013-11-28 Jakub Jelinek <jakub@redhat.com>
1808
1809 PR c/59310
1810 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1811 to p_name before calling c_parser_omp_teams instead of after.
1812 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1813 argument. Remove unused p_name variable.
1814
0136f8f0
AH
18152013-11-27 Aldy Hernandez <aldyh@redhat.com>
1816 Jakub Jelinek <jakub@redhat.com>
1817
1818 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1819 external_scope is NULL.
1820
241b71bb
TV
18212013-11-27 Tom de Vries <tom@codesourcery.com>
1822 Marc Glisse <marc.glisse@inria.fr>
1823
1824 PR c++/59032
1825 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1826
2fb9a547
AM
18272013-11-22 Andrew MacLeod <amacleod@redhat.com>
1828
1829 * c-typeck.c: Add required include files from gimple.h.
1830
8400e75e
DM
18312013-11-22 David Malcolm <dmalcolm@redhat.com>
1832
1833 * c-decl.c (define_label, shadow_tag_warned)
1834 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1835 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1836 (declspecs_add_type): Remove use of in_system_header macro.
1837 * c-parser.c (c_parser_unary_expression): Likewise.
1838 * c-typeck.c (store_init_value, process_init_element)
1839 (c_start_case): Likewise.
1840
1841 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1842 macro.
1843
1844 * c-parser.c (c_parser_set_source_position_from_token): Remove
1845 reference to in_system_header from comment.
1846
386b1f1f
RS
18472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1848
1849 * c-decl.c (grokdeclarator): Update comment to refer to
1850 tree_to_[su]hwi rather than tree_low_cst.
1851
ae7e9ddd
RS
18522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1853
1854 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1855 tree_to_uhwi throughout.
1856
9439e9a1
RS
18572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1858
1859 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1860 throughout.
1861
9541ffee
RS
18622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1863
1864 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1865 throughout.
1866
c02065fc
AH
18672013-11-15 Aldy Hernandez <aldyh@redhat.com>
1868
1869 * c-parser.c (c_parser_cilk_simd): New.
1870 (c_parser_cilk_verify_simd): New.
1871 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1872 (c_parser_omp_for_loop): Add case for NE_EXPR.
1873 Set c_break_label for CILK_SIMD.
1874 (c_parser_cilk_clause_vectorlength): New.
1875 (c_parser_cilk_clause_linear): New.
1876 (c_parser_cilk_clause_name): New.
1877 (c_parser_cilk_all_clauses): New.
1878 * c-typeck.c (build_unary_op): Pass location argument to
1879 readonly_error.
1880 (build_modify_expr): Same.
1881 (build_asm_expr): Same.
1882 (c_finish_bc_stmt): Error on break/continue in loops.
1883
18f429e2
AM
18842013-11-14 Andrew MacLeod <amacleod@redhat.com>
1885
1886 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1887
d8a2d370
DN
18882013-11-14 Diego Novillo <dnovillo@google.com>
1889
1890 * c-decl.c: Include print-tree.h.
1891 Include stor-layout.h.
1892 Include varasm.h.
1893 Include attribs.h.
1894 Include stringpool.h.
1895 * c-lang.c: Include fold-const.h.
1896 * c-parser.c: Include stringpool.h.
1897 Include attribs.h.
1898 Include stor-layout.h.
1899 Include varasm.h.
1900 Include trans-mem.h.
1901 * c-typeck.c: Include stor-layout.h.
1902 Include trans-mem.h.
1903 Include varasm.h.
1904 Include stmt.h.
1905
38b7bc7f
JM
19062013-11-13 Joseph Myers <joseph@codesourcery.com>
1907
1908 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1909 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1910 __auto_type.
1911 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1912 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1913 RID_AUTO_TYPE.
1914 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1915 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1916 (c_parser_declarator, c_parser_direct_declarator_inner)
1917 (c_parser_parameter_declaration, c_parser_type_name): All callers
1918 changed.
1919 (c_parser_declaration_or_fndef): Handle declarations with type
1920 determined from the initializer.
1921
45b0be94
AM
19222013-11-12 Andrew MacLeod <amacleod@redhat.com>
1923
18f429e2 1924 * c-typeck.c: Include gimplify.h.
45b0be94 1925
582d9b50
JM
19262013-11-12 Joseph Myers <joseph@codesourcery.com>
1927
1928 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1929 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1930 comment.
1931 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1932 or _Thread_local as appropriate in diagnostics.
1933 (build_null_declspecs): Initialize ret->thread_gnu_p.
1934 (declspecs_add_scspec): Handle either __thread or _Thread_local
1935 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1936 pedantic. Do not disallow _Thread_local extern and _Thread_local
1937 static.
1938
267bac10
JM
19392013-11-07 Joseph Myers <joseph@codesourcery.com>
1940 Andrew MacLeod <amacleod@redhat.com>
1941
1942 * c-aux-info.c (gen_type): Handle atomic qualifier.
1943 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1944 qualifiers when compating types.
1945 (shadow_tag_warned): Handle atomic_p in declspecs.
1946 (quals_from_declspecs): Likewise.
1947 (start_decl): Use c_type_promotes_to when promoting argument
1948 types.
1949 (grokdeclarator): Handle _Atomic.
1950 (get_parm_info): Diagnose any qualifier on "void" as only
1951 parameter.
1952 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1953 comparing types. Use c_type_promotes_to when promoting argument
1954 types.
1955 (finish_function): Use c_type_promotes_to when promoting argument
1956 types.
1957 (build_null_declspecs): Handle atomic_p in declspecs.
1958 (declspecs_add_qual): Handle RID_ATOMIC.
1959 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1960 (c_token_starts_declspecs): Handle RID_ATOMIC.
1961 (c_parser_declspecs): Handle atomic type specifiers and
1962 qualifiers.
1963 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1964 from types of expressions with atomic type.
1965 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1966 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1967 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1968 (c_parser_statement_after_labels, c_parser_switch_statement)
1969 (c_parser_for_statement, c_parser_expr_no_commas)
1970 (c_parser_conditional_expression, c_parser_binary_expression)
1971 (c_parser_cast_expression, c_parser_unary_expression)
1972 (c_parser_postfix_expression)
1973 (c_parser_postfix_expression_after_primary, c_parser_expression):
1974 Use convert_lvalue_to_rvalue.
1975 (c_parser_expression_conv, c_parser_expr_list): Document
1976 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1977 (c_parser_objc_synchronized_statement): Use
1978 convert_lvalue_to_rvalue.
1979 (c_parser_objc_selector): Handle RID_ATOMIC.
1980 (c_parser_objc_receiver, c_parser_array_notation): Use
1981 convert_lvalue_to_rvalue.
1982 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1983 _Atomic (type-name).
1984 (struct c_declspecs): Add atomic_p field.
1985 (convert_lvalue_to_rvalue): Declare.
1986 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1987 corresponding atomic types.
1988 (qualify_type): Don't add _Atomic qualifiers from second argument.
1989 (comp_target_types): Do not allow _Atomic mismatches.
1990 (type_lists_compatible_p): Do not remove atomic qualifiers when
1991 comparing types.
1992 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1993 (build_atomic_assign): New functions.
1994 (build_unary_op): Use build_atomic_assign for atomic increment and
1995 decrement.
1996 (build_conditional_expr): Do not treat _Atomic void as a qualified
1997 version of void.
1998 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1999 (find_anonymous_field_with_type, convert_to_anonymous_field)
2000 (convert_for_assignment): Do not remove atomic qualifiers when
2001 comparing types.
2002 (digest_init): Do not accept initialization of arrays of atomic
2003 elements by string constants.
2004 (build_asm_expr): Use convert_lvalue_to_rvalue.
2005 (build_binary_op): Do not treat _Atomic void as a qualified
2006 version of void.
2007
0c249d4b
DD
20082013-11-06 DJ Delorie <dj@redhat.com>
2009
2010 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2011 both explicit and builtin, print the location of the explicit one.
2012
6d7f7e0a
TB
20132013-11-05 Tobias Burnus <burnus@net-b.de>
2014
2015 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2016 c_parser_omp_distribute, c_parser_omp_teams,
2017 c_parser_omp_target, c_parser_omp_declare): Handle
2018 -fopenmp-simd.
2019
b906f4ca
MP
20202013-11-03 Marek Polacek <polacek@redhat.com>
2021
2022 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2023
ee1d5a02
JJ
20242013-11-01 Jakub Jelinek <jakub@redhat.com>
2025
2026 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2027 check_dup_generic at the end, unless remove is true.
2028 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2029 remove = true;.
2030 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2031
5a9785fb
JJ
20322013-10-31 Jakub Jelinek <jakub@redhat.com>
2033
2034 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2035 with decl that is not pointer nor array.
2036
939b37da
BI
20372013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2038
2039 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2040 a spawning function is found.
2041 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2042 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2043 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2044 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2045 case.
2046 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2047 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2048 expr.
2049 (c_finish_return): Added a check to reject _Cilk_spawn in return
2050 expression.
2051 (build_cilk_spawn): New function.
2052 (build_cilk_sync): Likewise.
2053 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2054
d4af74d4
TB
20552013-10-27 Tobias Burnus <burnus@net-b.de>
2056
2057 PR other/33426
2058 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2059 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2060 (c_parser_statement_after_labels): Update calls.
2061
d73749df 20622013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2063
2064 PR other/33426
2065 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2066 Handle PRAGMA_IVDEP.
2067 (c_parser_statement_after_labels): Update call.
2068
f28aa681
MP
20692013-10-24 Marek Polacek <polacek@redhat.com>
2070
2071 * c-parser.c (c_parser_struct_declaration): Add a comment.
2072 (c_parser_declarator): Don't allow _Alignas here.
2073
0645c1a2
AM
20742013-10-17 Andrew MacLeod <amacleod@redhat.com>
2075
2076 * c-parser.c: Include omp-low.h.
2077 * c-typeck.c: Likewise.
2078
568a31f2
MP
20792013-10-17 Marek Polacek <polacek@redhat.com>
2080
2081 PR c/58267
2082 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2083 Document syntax of the array-declarator.
2084 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2085 are not permitted.
2086 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2087 (c_parser_struct_declaration): Likewise.
2088 (c_parser_declarator): Likewise.
2089 (c_parser_direct_declarator_inner): Likewise.
2090 (c_parser_parameter_declaration): Likewise.
2091 (c_parser_type_name): Likewise.
2092
acf0174b
JJ
20932013-10-11 Jakub Jelinek <jakub@redhat.com>
2094
2095 * c-lang.h (current_omp_declare_target_attribute): New extern
2096 decl.
2097 * c-parser.c: Include c-lang.h.
2098 (struct c_parser): Change tokens to c_token *.
2099 Add tokens_buf field. Change tokens_avail type to unsigned int.
2100 (c_parser_consume_token): If parser->tokens isn't
2101 &parser->tokens_buf[0], increment parser->tokens.
2102 (c_parser_consume_pragma): Likewise.
2103 (enum pragma_context): Add pragma_struct and pragma_param.
2104 (c_parser_external_declaration): Adjust
2105 c_parser_declaration_or_fndef caller.
2106 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2107 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2108 Adjust recursive call.
2109 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2110 of pragma_external.
2111 (c_parser_parameter_declaration): Use pragma_param instead of
2112 pragma_external.
2113 (c_parser_compound_statement_nostart, c_parser_label,
2114 c_parser_for_statement): Adjust
2115 c_parser_declaration_or_fndef callers.
2116 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2117 it through to c_parser_conditional_expression.
2118 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2119 pass it through to c_parser_binary_expression. Adjust recursive
2120 call.
2121 (c_parser_binary_expression): Remove prec argument, add
2122 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2123 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2124 binop matches it, use build2 instead of parser_build_binary_op.
2125 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2126 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2127 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2128 Handle pragma_struct and pragma_param the same as pragma_external.
2129 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2130 (c_parser_omp_variable_list): Parse array sections for
2131 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2132 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2133 (c_parser_omp_clause_reduction): Handle user defined reductions.
2134 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2135 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2136 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2137 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2138 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2139 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2140 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2141 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2142 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2143 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2144 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2145 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2146 (c_parser_omp_for_loop): Add CODE argument, pass it through
2147 to c_finish_omp_for. Change last argument to cclauses,
2148 and adjust uses to grab parallel clauses from the array of all
2149 the split clauses. Adjust c_parser_binary_expression,
2150 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2151 (omp_split_clauses): New function.
2152 (c_parser_omp_simd): New function.
2153 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2154 Allow the function to be called also when parsing combined constructs,
2155 and call c_parser_omp_simd when parsing for simd.
2156 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2157 #pragma omp section, require exactly one structured-block instead of
2158 sequence of statements.
2159 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2160 Allow the function to be called also when parsing combined constructs.
2161 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2162 Allow the function to be called also when parsing combined
2163 constructs.
2164 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2165 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2166 c_parser_omp_teams, c_parser_omp_target_data,
2167 c_parser_omp_target_update, c_parser_omp_target,
2168 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2169 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2170 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2171 (c_parser_omp_construct): Add p_name and mask vars. Handle
2172 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2173 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2174 and c_parser_omp_sections callers.
2175 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2176 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2177 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2178 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2179 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2180 OMP_CLAUSE_DEPEND.
2181 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2182 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2183 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2184 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2185 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2186 * c-typeck.c: Include tree-inline.h.
2187 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2188 handle_omp_array_sections_1, handle_omp_array_sections,
2189 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2190 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2191 user defined reductions.
2192 (c_tree_equal): New function.
2193 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2194 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2195 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2196 c_check_omp_declare_reduction_r): New prototypes.
2197 * c-decl.c (current_omp_declare_target_attribute): New variable.
2198 (c_decl_attributes): New function.
2199 (start_decl, start_function): Use it instead of decl_attributes.
2200 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2201 c_omp_reduction_decl, c_omp_reduction_lookup,
2202 c_check_omp_declare_reduction_r): New functions.
2203
0a6c2227
TT
22042013-09-25 Tom Tromey <tromey@redhat.com>
2205
2206 * Make-lang.in (c/gccspec.o): Remove.
2207 (CFLAGS-c/gccspec.o): New variable.
2208 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2209 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2210 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2211
f3bc55f0
TT
22122013-09-25 Tom Tromey <tromey@redhat.com>
2213
2214 * Make-lang.in (c/gccspec.o): Don't use subshell.
2215
a24d975c
MP
22162013-09-18 Marek Polacek <polacek@redhat.com>
2217
2218 PR sanitize/58443
2219 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2220 Remove unnecessary check.
2221
ce6923c5
MP
22222013-09-18 Marek Polacek <polacek@redhat.com>
2223
2224 PR sanitizer/58411
2225 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2226 no_sanitize_undefined attribute.
2227
a1e51df9
KT
22282013-09-13 Kai Tietz <ktietz@redhat.com>
2229
2230 PR target/57848
2231 * c-decl.c (c_builtin_function_ext_scope): Remove
2232 wrong assumption that it is never called on prexisting
2233 symbol.
2234
0af94e6f
JR
22352013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2236
2237 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2238
20059c8b
GDR
22392013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2240
2241 * c-objc-common.c (c_tree_printer): Tidy.
2242
de5a5fa1
MP
22432013-08-30 Marek Polacek <polacek@redhat.com>
2244
2245 * c-typeck.c (build_binary_op): Add division by zero and shift
2246 instrumentation.
2247
2531a1d9 22482013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2249 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2250
6e2bcc98 2251 PR c/35649
2531a1d9
JR
2252 * c-typeck.c (c_common_type): Prefer double_type_node over
2253 other REAL_TYPE types with the same precision.
2254 (convert_arguments): Likewise.
2255
025311c4
GDR
22562013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2257
2258 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2259 (c_initialize_diagnostics): Call a destructor for the early printer.
2260
da6ca2b5
GDR
22612013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2262
2263 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2264 printer initialization.
2265
318cda85 22662013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2267
318cda85
BI
2268 PR c/57490
2269 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2270 check for truth values.
2271 (expand_array_notation_exprs): Added truth values case. Removed an
2272 unwanted else. Added for-loop to walk through subtrees in default
2273 case.
2274
b066401f
GDR
22752013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2276
2277 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2278
fb48aadc
JM
22792013-07-23 Joseph Myers <joseph@codesourcery.com>
2280
2281 * c-parser.c (struct c_generic_association): Fix typo.
2282
433cc7b0
TT
22832013-07-23 Tom Tromey <tromey@redhat.com>
2284 Joseph Myers <joseph@codesourcery.com>
2285
2286 * c-parser.c (struct c_generic_association): New.
2287 (c_generic_association_d): New typedef.
2288 (c_parser_generic_selection): New function.
2289 (c_parser_postfix_expression): Handle RID_GENERIC.
2290
26d40c3d
JM
22912013-07-13 Jason Merrill <jason@redhat.com>
2292
2293 PR c++/57793
2294 * c-decl.c (finish_struct): Check for too-large class.
2295
ecdbd01a 22962013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2297
2298 PR c/57821
2299 * c-typeck.c (set_init_index): When folding, check for index overflow.
2300
1141ed3f
BI
23012013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2302
2303 * c-parser.c (c_parser_array_notation): Removed rejection of array
2304 notations in an array of function pointers.
2305
713b46fa
BI
23062013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2307
2308 * c-array-notation.c (make_triplet_val_inv): New function.
2309 (create_cmp_incr): Likewise.
2310 (create_array_refs): Likewise.
2311 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2312 Also modularized common parts between functions and called the function.
2313 (build_array_notation_expr): Likewise.
2314 (fix_conditional_array_notations_1): Likewise.
2315 (fix_array_notation_expr): Likewise.
2316 (fix_array_notation_call_expr): Likewise.
2317
92f20202
MP
23182013-06-18 Marek Polacek <polacek@redhat.com>
2319
2320 PR c/57630
2321 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2322
73a23b06
BI
23232013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2324
2325 * c-array-notation.c (build_array_notation_expr): Reject array notation
2326 mismatch between LHS and RHS even inside a call_expr. Also, removed
2327 a couple while statements that were dead code.
2328
00b8517d
BI
23292013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2330
2331 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2332 excessive precision expressions in function parameters. Also removed
2333 couple unwanted while statements.
2334
1509bdda
BI
23352013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2336
2337 * c-array-notation.c (expand_array_notation_exprs): Added
2338 ARRAY_NOTATION_REF case.
2339
d60f1706
BI
23402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2341
2342 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2343 function to c-family/array-notation-common.c.
2344 (is_cilkplus_reduce_builtin): Likewise.
2345 (find_rank): Likewise.
2346 (extract_array_notation_exprs): Likewise.
2347 (replace_array_notations): Likewise.
2348 (find_inv_trees): Likewise.
2349 (replace_inv_trees): Likewise.
2350 (contains_array_notation_expr): Likewise.
2351 (find_correct_array_notation_type): Likewise.
2352 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2353 (struct inv_list): Moved this to c-family/array-notation-common.c.
2354 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2355
6d6efbb3
BI
23562013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2357
2358 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2359 reduction functions outside the for-loop. Added a check if the fundecl
2360 is non-NULL. Finally, removed an unwanted if-statement, and made the
2361 body unconditional.
2362
25c22937
BI
23632013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2364
2365 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2366 condition of the if-statement matches the rank of else-block and then-
2367 block when array notations are used.
2368 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2369 expression after the entire function body is parsed.
2370 (c_parser_expr_no_commas): Delayed creating array notation expressions
2371 to the end of function parsing.
2372 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2373 whole if-statement instead of just the condition.
2374 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2375
edd25645
BI
23762013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2377
2378 PR c/57474
2379 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2380 array to NULL_TREE if they are unused. Also added a check for the
2381 field to be NULL before its fields are used in future.
2382
065ce7f1
RO
23832013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2384
2385 PR bootstrap/57450
2386 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2387 (build_array_notation_expr): Likewise.
2388
36536d79
BI
23892013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2390
2391 * c-typeck.c (build_array_ref): Added a check to see if array's
2392 index is greater than one. If true, then emit an error.
2393 (build_function_call_vec): Exclude error reporting and checking
2394 for builtin array-notation functions.
2395 (convert_arguments): Likewise.
2396 (c_finish_return): Added a check for array notations as a return
2397 expression. If true, then emit an error.
2398 (c_finish_loop): Added a check for array notations in a loop
2399 condition. If true then emit an error.
2400 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2401 (build_binary_op): Added a check for array notation expr inside
2402 op1 and op0. If present, we call another function to find correct
2403 type.
2404 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2405 * c-parser.c (c_parser_compound_statement): Check if array
2406 notation code is used in tree, if so, then transform them into
2407 appropriate C code.
2408 (c_parser_expr_no_commas): Check if array notation is used in LHS
2409 or RHS, if so, then build array notation expression instead of
2410 regular modify.
2411 (c_parser_postfix_expression_after_primary): Added a check for
2412 colon(s) after square braces, if so then handle it like an array
2413 notation. Also, break up array notations in unary op if found.
2414 (c_parser_direct_declarator_inner): Added a check for array
2415 notation.
2416 (c_parser_compound_statement): Added a check for array notation in
2417 a stmt. If one is present, then expand array notation expr.
2418 (c_parser_if_statement): Likewise.
2419 (c_parser_switch_statement): Added a check for array notations in
2420 a switch statement's condition. If true, then output an error.
2421 (c_parser_while_statement): Similarly, but for a while.
2422 (c_parser_do_statement): Similarly, but for a do-while.
2423 (c_parser_for_statement): Similarly, but for a for-loop.
2424 (c_parser_unary_expression): Check if array notation is used in a
2425 pre-increment or pre-decrement expression. If true, then expand
2426 them.
2427 (c_parser_array_notation): New function.
2428 * c-array-notation.c: New file.
2429 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2430
cd192ccc
MS
24312013-05-23 Mike Stump <mikestump@comcast.net>
2432
2433 * c-typeck.c (convert_for_assignment): Handle references to memory
2434 spaces better.
2435
427b248d
JM
24362013-05-16 Jason Merrill <jason@redhat.com>
2437
2438 * Make-lang.in (cc1$(exeext)): Use link mutex.
2439
44d90fe1
PC
24402013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2441
2442 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2443 to simply use OPT_Wpointer_arith.
2444 (build_unary_op): Likewise.
2445
4e7d7b3d
JJ
24462013-04-03 Jakub Jelinek <jakub@redhat.com>
2447
2448 PR c/19449
2449 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2450 argument. If set, or it temporarily for parsing of the first
2451 argument into force_folding_builtin_constant_p.
2452 (c_parser_postfix_expression): Adjust callers.
2453
839b422f
RB
24542013-03-21 Richard Biener <rguenther@suse.de>
2455
2456 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2457 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2458
2ee028f1
MP
24592013-02-12 Marek Polacek <polacek@redhat.com>
2460
2461 PR c/44938
2462 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2463 origtypes to NULL.
2464
8824edff
JJ
24652013-01-24 Jakub Jelinek <jakub@redhat.com>
2466
2467 PR c/56078
2468 * c-typeck.c (set_nonincremental_init_from_string): If
2469 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2470 returned false.
2471 (process_init_element): Likewise.
2472
eadd3d0d
JJ
24732012-12-20 Jakub Jelinek <jakub@redhat.com>
2474
2475 PR c++/55619
2476 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2477 argument, don't call default_function_array_conversion
2478 nor c_fully_fold here.
2479 (c_parser_asm_statement): Adjust callers.
2480 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2481 and outputs here, and call default_function_array_conversion
2482 on inputs that don't need to be addressable.
2483
f8a93a2e
JJ
24842012-12-18 Jakub Jelinek <jakub@redhat.com>
2485
2486 PR c/39464
2487 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2488 warning require that both c_common_unsigned_type as well as
2489 c_common_signed_type is the same for both mvl and mvr types.
2490
9771b263
DN
24912012-11-16 Diego Novillo <dnovillo@google.com>
2492
2493 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2494
2495 * c-common.c: Use new vec API in vec.h.
2496 * c-common.h: Likewise.
2497 * c-gimplify.c: Likewise.
2498 * c-pragma.c: Likewise.
2499 * c-pretty-print.c: Likewise.
2500 * c-pretty-print.h: Likewise.
2501 * c-semantics.c: Likewise.
2502 * c-decl.c: Likewise.
2503 * c-parser.c: Likewise.
2504 * c-tree.h: Likewise.
2505 * c-typeck.c: Likewise.
2506
880661a4
JW
25072012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2508
2509 PR c++/54930
2510 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2511
077d1abe
MLI
25122012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2513
2514 PR c/53066
2515 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2516 shadows a function, unless the variable is a function or a
2517 pointer-to-function.
2518
3a785c97
JJ
25192012-10-12 Jakub Jelinek <jakub@redhat.com>
2520
2521 PR c/54381
2522 * c-parser.c (struct c_tree_loc_pair): Removed.
2523 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2524 add location_t * and tree * arguments, fill in array of 3
2525 sizeof_arg trees and corresponding locs.
2526 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2527 c_parser_expr_list callers.
2528 (c_parser_postfix_expression_after_primary): Likewise. Pass
2529 array of 3 sizeof_arg trees and locs (corresponding to first
2530 3 arguments) to sizeof_pointer_memaccess_warning.
2531
703c8606
LC
25322012-10-09 Lawrence Crowl <crowl@google.com>
2533
2534 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2535 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2536 hash table.
2537
5d9de0d0
PC
25382012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2539
2540 PR c++/54194
2541 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2542 call.
2543
a212e43f
MG
25442012-10-09 Marc Glisse <marc.glisse@inria.fr>
2545
2546 PR c++/54427
2547 * c-typeck.c: Include c-common.h.
2548 (enum stv_conv): Moved to c-common.h.
2549 (scalar_to_vector): Moved to c-common.c.
2550 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2551 * Make-lang.in: c-typeck.c depends on c-common.h.
2552
3b78de56
AC
25532012-10-04 Arnaud Charlet <charlet@adacore.com>
2554
2555 * c-decl.c (c_write_global_declarations): Fix handling of
2556 -fdump-ada-spec*.
2557
78c60e3d
SS
25582012-09-30 Sharad Singhai <singhai@google.com>
2559
2560 * c-decl.c (c_write_global_declarations): Use a different method
2561 to determine if the dump has ben initialized.
2562
9f33203d
JM
25632012-09-14 Joseph Myers <joseph@codesourcery.com>
2564
2565 PR c/54552
2566 * c-typeck.c (c_cast_expr): When casting to a type requiring
2567 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2568 c_fully_fold first.
2569
a27d595d
JM
25702012-09-14 Joseph Myers <joseph@codesourcery.com>
2571
2572 PR c/54103
2573 * c-typeck.c (build_unary_op): Pass original argument of
2574 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2575 any C_MAYBE_CONST_EXPR, if it has integer operands.
2576 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2577 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2578 to c_objc_common_truthvalue_conversion, then remove any
2579 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2580 c_objc_common_truthvalue_conversion not
2581 c_common_truthvalue_conversion.
2582 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2583 call note_integer_operands for arguments with integer operands
2584 that are not integer constants.
2585
9feb29df
JJ
25862012-09-13 Jakub Jelinek <jakub@redhat.com>
2587
2588 PR c/54559
2589 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2590 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2591
d409320c
JJ
25922012-08-31 Jakub Jelinek <jakub@redhat.com>
2593
2594 PR c/54428
2595 * c-convert.c (convert): Don't call fold_convert_loc if
2596 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2597 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2598 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2599
6265d07c
JJ
26002012-08-24 Jakub Jelinek <jakub@redhat.com>
2601
2602 PR c/54355
2603 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2604 for nested and empty_ok arguments in the call to
2605 c_parser_declaration_or_fndef.
2606
1a4049e7
JJ
26072012-08-17 Jakub Jelinek <jakub@redhat.com>
2608
2609 * c-tree.h (c_last_sizeof_arg): Declare.
2610 * c-parser.c (struct c_tree_loc_pair): New type.
2611 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2612 non-NULL.
2613 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2614 (c_parser_postfix_expression_after_primary): Likewise. Call
2615 sizeof_pointer_memaccess_warning if needed.
2616 (sizeof_ptr_memacc_comptypes): New function.
2617 * c-typeck.c (c_last_sizeof_arg): New global variable.
2618 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2619
0229aee9
UB
26202012-07-24 Uros Bizjak <ubizjak@gmail.com>
2621
2622 * c-lang.h (lang_decl): Add variable_size GTY option.
2623
7ee2468b
SB
26242012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2625
2626 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2627 * Make-lang.in: Fix dependencies.
2628
d4a10d0a
SB
26292012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2630
2631 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2632 and add language Makefile hooks.
2633 * config-lang.in: New file.
2634 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2635 add the required "normal" config-lang.in rules.
2636 * c-lang.h: Moved from gcc/ to here.
2637 * c-tree.h: Likewise.
2638 * c-objc-common.c: Likewise.
2639 * c-objc-common.h: Likewise.
2640 * c-typeck.c: Likewise.
2641 * c-convert.c: Likewise.
2642 * c-lang.c: Likewise.
2643 * c-aux-info.c: Likewise.
2644 * c-errors.c: Likewise.
2645 * gccspec.c: Likewise.
2646 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2647 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2648\f
5624e564 2649Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2650
2651Copying and distribution of this file, with or without modification,
2652are permitted in any medium without royalty provided the copyright
2653notice and this notice are preserved.